Home
About
Search
🌐
English Română
  • The new ZCE PHP 5.3 certification

    Citește postarea în română

    Oct 17, 2010 certification php5 php5.3 zce
    Share on:

    Since PHP 5.3 was released last year I’ve been wandering if Zend was going to introduce a new ZCE certification for this version.

    Seems like with the version PHP 6 abandoned some time back the direction was to a PHP 5.3 certification.

    I don’t think the time was random considering that Zend Con, the biggest PHP conference, is near.

    What’s new?

    Differences between PHP 5 and PHP 5.3 are in the manual here.

    Some of the most important once:

    • Namespaces
    • Late static binding
    • Lambda Functions and Closures

    Materials

    The certification information is on the Zend website.

    After finding that the certification for Zend Framework has a study guide completely free for registered users, I was wandering why there isn’t one for the regular PHP certification. It looks like now there is: Zend-PHP-5.3-Study-Guide-v1-3.pdf, in beta version! And is free for download!

    Of course the most important material remains the manual manualul PHP, because the guide is used in conjunction with it.

    It looks like the mock tests are out, as for the Zend Framework never existed anyway.

    Price

    The price has gone up, it isn’t 160$ anymore but 190$! The price remains a very small one anyway considering that an exam at Sun was 200$, and now at Oracle is 300$.

    The already certified users receive an 20% discount until the end of the year, so if you are already certified you will pay 152$.

    Best of luck!

  • PHP for Android a first opinion

    Citește postarea în română

    Aug 21, 2010 Android PHP PHP for Android
    Share on:

    When it comes to Android and PHP a lot has been written about PHP for Android.

    The concept is simple, Google launched Android Scripting Environment (ASE).

    ASE is as the name suggests, a scripting environment, and the apps are not compiled and they can be modified at all times by the user.

    Over ASE there are extensions installed for different languages like: Python, LUA, Perl, JavaScript or JRuby.

    Unfortunately there isn’t official support for PHP from Google, but there is PHP for Android, project which allows the integration between PHP CLI and this environment.

    The installation is very simple and is done directly on the phone. For development Android SDK simulator can be used.

    One of the issues is that the app can’t be packed as an APK, so it can’t be posted on Android Market.

    Basically this was the only issue raised so far everywhere, issue that doesn’t seem exactly big considering the facilities available in this environment.

    I’ve searched for apps build with PFA, I’ve found only a few, actually I found only a few even in other languages using ASE. Why aren’t the users eager to develop in this environment? Simple, using the scripting environment you can access a lot of facilities of available on the phone, like vibrating for instance and about all the available dialogs. But there is an essential feature which is totally lacking (or at least at the time this blog is written), there isn’t a graphical interface, like any kind of window that isn’t a dialog.

    So what is the purpose of adding an app to Android Market if there is no graphic interface? I don’t believe there is almost no real consistent reason at this point.

    But what are the developers doing in this environment then? Well Cellbots for instance.Basically you can do some interesting toys, but don’t expect to do real apps (yet). Another project it was sending a NexusOne into space.

    So the project is interesting, but I don’t think it has the purpose of developing traditional apps just yet.

  • When the optimization should take place

    Citește postarea în română

    Aug 3, 2010 optimization
    Share on:

    There are whole books about optimization, but few mention when is the right moment for the optimization to take place.

    There are several perspectives with fundamental differences:

    • during development
    • at the end of the development cycle
    • never

    What is the correct answer? In fact there are only less correct or inadequate.

    During development

    This answer has the most potential to be wrong.

    Even though is the most common method and it shouldn’t be interpreted as being wrong, it has the potential to cause issues.

    When it may cause issues? When instead of optimization, micro-optimization is used in excess.

    Micro-optimization can come in many shapes, depending on how the project is developed. Some write “bulk” code or procedural code, others use frameworks and ORMs. When your deviating from the general rule of writing code to do optimization you should think about the consequences. It will be harder for the next guy that looks at your code to understand what’s going on, and if you make a rule out of that, with time the project will become indecipherable.

    For instance if your using ORM and you start typing SQL you are already losing the purpose of the ORM. In ROM there are several steps for each interrogation:

    Building the objectual interrogation -> Parse to SQL -> Execute interrogation -> Parse result -> Loading the resulting objects

    vs.

    Building the SQL interrogation -> Execute interrogation -> Parse result

    The steps may varies depending on the implementation.

    A lot of the times the second approach looks simpler and is faster for sure. But why use the first approach? For the architectural advantages! You can set triggers when accessing or setting the properties for instance.

    A mature developer is the one that writes “readable” code, not just optimum.

    At the end of the developing cycle

    The advantage is that there are no architectural compromises during development.

    This is usual the best method, because you have the finished product, developed without compromise and you can see which points should be optimized. When you have all the components is much simpler to reorganize them then during the development when changes may appear, which in turn can generate for instance code redundancy.

    The disadvantage is that at the end is sometimes difficult to find the week points of the application.

    Never

    First of all let’s make it clear, I mean “serious” projects.

    There is a general rule that’s saying “hardware is cheap, programmers are expensive”. More broadly this means that a lot of the times is easier to scale an application using hardware then doing major compromises in the code.

    A lot of companies and projects support this perspective. Correctly applied this principle has the advantage of having a well organized code, easy to read and with few hacks.

    The advantage is at development, few hacks make a project more organized (in theory) and easier to extend.

    Unfortunately looks like there is also a different interpretation: “if must work, it doesn’t have to be perfect”. Where can this lead to? Basically is the best excuse for dirty code.

    The major difference is that you never optimize, and the code will look just as bad as when you do excessive micro-optimization.

    Conclusion

    In general, project that use excessively micro-optimization, have a great potential to be often rewritten, either partially of full, because there is another rule that says “rather then repair, a lot of the times is easier to rewrite”. Unfortunately projects with bad written code suffer the same fate.

    A major disadvantage to bad code is that it slows the development cycle, in other words minor tasks tend to last longer and longer to be accomplished.

    Projects don’t have to be always optimized. But when we have to do that, compromises regarding the architecture must be at minimum.

  • PHP type hinting for scalar data types, a step closer

    Citește postarea în română

    May 22, 2010
    Share on:

    In PHP 5 a new concept was introduced, type hinting. This feature allows validation of a parameter for a certain type.

    This validation type is very popular in object orientated languages and I believe it represents a plus for the PHP object model and even more for his dynamic nature it self.

    In PHP 5.1 validation for the array data type was added.

    Let’s take a small example:

     1class a { }
     2
     3class b { }
     4
     5function testa (a $a) {
     6    echo "Bla bla\n";
     7}
     8
     9testa(new a());
    10
    11testa(new b());
    

    The result is:

    1Bla bla
    2
    3Fatal error: Argument 1 passed to testa() must be an instance of a, called in ...
    

    Cool, ha?

    The type in which we can validate can be a class, an abstract class or even an interface which is inherited  by other classes, like:

     1interface inherited { }
     2
     3class a implements inherited { }
     4
     5class b implements inherited { }
     6
     7function testa (inherited $a) {
     8    echo "Bla bla\n";
     9}
    10
    11testa(new a());
    12
    13testa(new b());
    

    And the above example will not raise any errors.

    Unfortunately there is no way to validate primary (or scalar) data types. When PHP 5.3 was being released there have been some discussions on the subject, but it seems that it was too late, and the patch did not make it to the final version.

    Yesterday, while I was doing my morning reading at a cup of coffee, what do I see on Ilia Alshanetsky blog: Scalar Type Hints are Here! Well, is a little exaggerated, there are not exactly here but there really close. Basically there are in the SVN trunk and will be available in the next stable version!

    Of course that even in the current version of type hinting is not exactly mandatory to use it in PHP, is more of an issue of fine tune.

    Basically we could already validate to a certain primary data type, but still:

    1function testint($var) {
    2     if(!is_int($var)) {
    3         trigger_error("Type must be Integer", E_USER_ERROR);
    4     }
    5     .......
    6}
    

    is not exactly as elegant as:

    1function testint(int $var) {
    2     ......
    3}
    
  • CodeIgniter 1.7 Professional Development Packt Publishing – Book review part 1

    Citește postarea în română

    May 11, 2010 CodeIgniter PHP
    Share on:

    0905.jpg

    Packt Publishing has published a new book on the RAD PHP framework CodeIgniter version 1.7. The book CodeIgniter 1.7 Professional Development written by Adam Griffiths, has the slogan “become CodeIgniter experts with professional tools, techniques and extended libraries”.

    Just from the slogan you can see a slightly different tone then the book CodeIgniter 1.7 from Packt Publishing, which in my opinion has the purpose of showing what the CodeIgniter framework can do.

    This book has the purpose of showing how can you develop professional applications, or at least until proven otherwise, stay tuned to find out!

    An argument for the slogan is the target audience like is defined in the “Who this book is written for” section, which contains the phrase:

    Basic knowledge of CodeIgniter will be helpful.

    A dangerous phrase in my opinion, because it can scare off a beginner, even though in the book it looks like all the steps are described starting from server installation.

    If from the first book I was expecting a general presentation of the framework, now I’m curios to see if the examples are more ample and more concrete.

    From the sample chapter it looks like there is a lot of code. As long as it is logical I thing it’s a good thing, a lot of times is easier to understand code, which you will after all write and you can take as an example, then theory.

    But more about this book after I’ll get to read it.

    To be continued…

    • ««
    • «
    • 5
    • 6
    • 7
    • 8
    • 9
    • »
    • »»

Claudiu Perșoiu

Programming, technology and more
Read More

Recent Posts

  • Adding a slider to Tasmota using BerryScript
  • The future proof project
  • Docker inside wsl2
  • Moving away from Wordpress
  • Custom path for Composer cache
  • Magento2 and the ugly truth
  • A bit of PHP, Go, FFI and holiday spirit
  • How to make use of the Xiaomi Air Conditioning Companion in Home Assistant in only 20 easy steps!

PHP 49 MISCELLANEOUS 46 JAVASCRIPT 14 MAGENTO 7 MYSQL 7 BROWSERS 6 DESIGN PATTERNS 5 HOME AUTOMATION 2 LINUX-UNIX 2 WEB STUFF 2 GO 1

PHP 35 JAVASCRIPT 15 PHP5.3 11 MAGENTO 7 PHP6 7 MYSQL 6 PHP5.4 6 ZCE 6 CERTIFICARE 5 CERTIFICATION 5 CLOSURES 4 DESIGN PATTERNS 4 HACK 4 ANDROID 3
All tags
3D1 ADOBE AIR2 ANDROID3 ANGULAR1 ANONYMOUS FUNCTIONS3 BERRYSCRIPT1 BOOK1 BROWSER2 CARTE1 CERTIFICARE5 CERTIFICATION5 CERTIFIED1 CERTIFIED DEVELOPER1 CHALLENGE1 CHM1 CLASS1 CLI2 CLOSURES4 CODE QUALITY1 CODEIGNITER3 COFFEESCRIPT1 COLLECTIONS1 COMPOSER1 CSS1 DEBUG1 DESIGN PATTERNS4 DEVELOPER1 DEVELOPMENT TIME1 DOCKER2 DOCKER-COMPOSE1 DOUGLAS CROCKFORD2 ELEPHPANT2 FACEBOOK2 FFI1 FINALLY1 FIREFOX3 GAMES1 GENERATOR1 GO1 GOOGLE1 GOOGLE CHROME1 GOOGLE MAPS1 HACK4 HOMEASSISTANT2 HTML2 HTML HELP WORKSHOP1 HTML51 HUG1 HUGO1 INFORMATION_SCHEMA1 INI1 INTERNET EXPLORER3 IPV41 IPV61 ITERATOR2 JAVASCRIPT15 JQUERY1 LAMBDA1 LINUX1 MAGENTO7 MAGENTO22 MAP1 MINESWEEPER1 MOTIVATION1 MYSQL6 NGINX1 NODE.JS2 NOSQL1 OBSERVER3 OBSERVER PATTERN1 OOP1 OPERA1 OPTIMIZATION1 ORACLE1 PAGESPEED1 PAIR1 PARSE_INI_FILE1 PHONEGAP2 PHP35 PHP ELEPHANT2 PHP FOR ANDROID1 PHP-GTK1 PHP42 PHP53 PHP5.311 PHP5.46 PHP5.53 PHP5.61 PHP67 PHP7.41 PROGRAMMING1 REVIEW1 ROMANIAN STEMMER2 SAFARY1 SCALAR TYPE HINTING1 SCHEME1 SET1 SHOPPING CART PRICE RULE1 SINGLETON1 SOAP1 SPL2 SQLITE1 SSH1 STACK TRACE1 STDERR1 STDIN1 STDOUT1 SUN1 SYMFONY2 TASMOTA1 TEST TO SPEECH1 TITANIUM2 TRAITS1 TTS1 UBUNTU1 UNICODE2 UTF-82 VECTOR1 WEBKIT1 WINBINDER1 WINDOWS2 WORDPRESS1 WSL21 YAHOO3 YAHOO MAPS1 YAHOO OPEN HACK1 YSLOW1 YUI1 ZCE6 ZCE5.31 ZEND3 ZEND FRAMEWORK3
[A~Z][0~9]

Copyright © 2008 - 2024 CLAUDIU PERȘOIU'S BLOG. All Rights Reserved