skoop.dev

  • About
  • @skoop@phpc.social
  • PHP Production Mode

    December 18, 2006
    php

    PHP 10.0 posted about an idea for a php.ini configuration option that would toggle if PHP is running in “production mode”. This would then automatically set some settings, such as disabling display_errors, disallowing phpinfo(), remove or strip expose_php, and ensure not-bad values of memory_limit and max_execution_time. Yeah, nice idea, but I don’t think it will work.

    First of all, as I also commented on the article, if someone would configure memory_limit and max_execution_time to 0 (unlimited) … how would you decide what the correct value was? Or would you simply stop all PHP execution until they fix the configuration? Both don’t sound like a good option.

    But also, the definition of “production mode” is probably different. A lot of “experts” would want control over their configuration even in production mode. Of course, they could just set the configuration option to “Off”, but that makes the semantics of your php.ini incorrect.

    I’d rather keep the responsibility of the configuration of php with the server admin. And yes, there will be badly configured servers, and these servers may even be abused to bother other people, but I’d rather have it this way than restrict and confuse in an attempt to “help”.

  • PHP5 adoption

    December 12, 2006
    adoption, hosting, php, php5

    Ilia wonders why people are not using PHP5. A good question, which I even asked of the Joomla! developers a while ago. The answer from Joomla! was predictable and logical: Hosting providers have not adopted PHP5 enough to warrant the switch as of now. Joomla! 2.0 will probably be PHP5, but not earlier.

    According to Nexen, only just over 12% of all PHP installations are PHP5. For a PHP version that has been available for over two years already, that is a very bad score. And I truly don’t understand why.

    Some of the reasons I’ve heard are:

    – Hosting provider does not want to upgrade because it breaks compatibility with PHP3 applications client is using
    – PHP4 is stable, why change a winning team?
    – Upgrade contains risk

    That first reason is scary already, and I’ve really heard that one, though that was about a year ago. Someone still running on PHP3 really doesn’t want to do anything good I guess.

    The second reason is the one I can accept, even though there are tons of reasons to go to PHP5. For hosting providers who don’t do development, I can perfectly accept this reason. As long as PHP4 is supported and new versions of that come out, there is no need to make the move.

    The last reason is stupid. There is little risk in upgrading, especially with the good documentation all around the Internet on upgrading.

    For development companies however, there is no excuse anymore. Especially, as Ilia mentions, since PHP 5.2 is more performant as any previous PHP version. That, combined with all the new options in PHP5, such as SimpleXML, the new object model, and you name it, there is no reason to stick to PHP4. With PHP5, PHP made a truely big step from a scripting language towards a real programming language, and now it’s time for developers to do the same.

    I am trying to contribute to this by trying to get my current employer to do all future development in PHP5. Since we do a lot of hosting of our clients ourselves, this should not be too much of a problem. Since the new Joomla! 1.5 is written with at least forwards compatibility in mind, hopefully we should not have too much trouble with this approach.

  • The Joomla!Days are over

    December 9, 2006
    conferences, joomla, php, symfony

    The Joomla!Days are over, let my Joomla!Days begin. When I started working for my current employer I knew they were working with Joomla! and Mambo a lot, and I wasn’t the biggest fan of that CMS. But with 1.5 they have been doing a lot to make it one of the most impressive CMS’es out there by actually thinking it out and doing a lot of proper system design. The framework beneath the new version is well thought-out and well-designed, and even though it is in PHP4, it seems to be a very nice framework with a good approach to development.

    The development of the J!Code Joomla IDE also looks nice and I was mightily impressed by Laurens Vanderput’s work on SiteMAN, which I think has a lot of potential and will be very useful, for instance for (potential?) clients that don’t really know how to work with web interfaces. SiteMAN is a very simple approach to managing your website.

    Joomla! versus the rest

    Lately I’ve been working with Symfony for application development, and that won’t stop. Symfony is perfect for big, complex applications that don’t necessarily evolve around content management in the traditional sense. Joomla! however has made the conscious decision to stick with content management, and do that right. So the Joomla! framework is focussed on content management mainly, and they do that very very well. This allows them to really stick to what they do best. A very wise decision.

    So what’s next for me?

    Quite simple. I’m sticking with Symfony for big application development, but I want to find one of my smaller websites that is mainly around, well, weblogging or something like that, and see if I can migrate that to Joomla! 1.5 so that I can learn more about the framework and the CMS. That should keep me occupied for a while. Maybe I can also help the Joomla! community out in one way or another. We’ll see what happens. I’m very enthousiastic though about Joomla! after these two days.

  • Dutch Joomla!Day 2

    December 9, 2006
    conferences, joomla, php

    Second day of the dutch Joomla!Days, it’s morning and I’m currently at the Dutch Open Projects stand representing the company. We’re currently looking for 4 coders and possibly an account manager, which we hope to get from the Joomla! community. Or at least get some contacts.

    Plan for today:

    10.15 – 11.00: Keynote speech by Johan Janssens
    12.00 – 13.45: Joomla! 1.5 Framework session by Johan Janssens
    14.45 – 16.30: either a session about migration from Joomla! 1.0 to 1.5, or a session about webservices with Joomla! 1.5

    As yesterday, I’ll update this post whenever I am at a session.

    10:14: Johan Janssens speaks about the history of Joomla! now. He explains that the Joomla! team is offering services such as the developer network and the extensions site to support the community. They do not want to control the content and judge, simply to offer it as a service to users and developers.

    Johan also mentions that Joomla! and Drupal and other projects are working together to make a strong stand against commercial projects. They’re not trying to compete.

    It’s interesting to see how professional the Joomla! team has been structured, with a core team that coordinates and work groups that have specific tasks. For instance there is a seperate QA workgroup that checks all bugs marked as resolved, and tests each release.

    Joomla! is also working on a special version of Eclipse which will be branded as ‘J!Code’, which integrates Eclipse with the Joomla! documentation to show the tooltips for Eclipse functions. The first build should be available soon.

    12:00: Johan starts to tell a bit more about J!Code, the Eclipse-based Joomla! IDE, for which a first release is available (unfortunately just for windows).Then he moves on back toward the framework.

    In the framework, all Joomla! libraries start with a J. Johan asks all developers not to start their own libraries with a J to prevent conflicts. The structure of the framework is very clear and logical, with an MVC setup. The MVC setup is slightly extended because there is a difference in Joomla between an extension and an application.

    Today, Johan goes deeper into the used design patterns. For people new to design patterns, he explains what the patterns do, but for people who already know it, he uses examples from the framework to explain it, so that it is useful for everyone.

    Now, we get a nice series of flowcharts on how the system is executed, what happens where, etc. It is very nice to see that the Observer pattern is nicely implemented in the system, and that security is one of the most important focusses.

    The MVC implementation in Joomla! is very much decoupled. The Controler loads the Model and feeds it with the information it needs to execute it’s logic, then loads the View. The View then talks to the Model to get the right information, but the View can not set information. The Model does not talk to the Controller or the View. This is a much more flexible MVC setup than some other frameworks such as Cake. Decoupling is very important to Joomla!

    Johan gives a clear explanation of how to write a simple component. He does this by starting with an “old-style” component, and then explaining what to do with MVC within a component. It’s pretty simple and logical.

    A hot issue is backwards compatiblity versus new features and good setup of new features. For now, it should all be backwards compatible, and so some of the features are not yet set up in the best possible way. Approaches to this are open for discussion for newer versions.

    14:48: Webservices in Joomla! 1.5 is the session that I’m attending now. It’s in a very small room, too small for the number of people interested it seems. A lot of moving around, getting extra chairs etc. Clearly a hot topic. Presenter of this session is Laurens Vanderput, one of the new Joomla! developers that joined after participating in the Google Summer of Code.

    He starts with a clear description of what webservices are and how they work. He then goes into Service Oriented Architecture, stating that it’s a big advantage to use it because clients will only need to know the protocol and data definition, and not how the data gathering is implemented. One of the disadvantages is that it’s by default a stateless system, so authentication and authorization needs to be implemented by the client and servers.

    He explains some webservice-related concepts such as WSDL, UDDI, WS-Security, WS-ReliableExchange.

    As second part, Laurens goes into the different protocols and explains the basics: XML-RPC/JSON-RPC, SOAP and REST. XML-RPC and SOAP are both defined by Microsoft at first. Microsoft then threw XML-RPC away because it was too simple, and yet now XML-RPC is outperforming SOAP both in speed and in number of implementations.

    XML-RPC has 8 set datatypes, and that’s it. No custom data types are possible. The Blogger API is a good example of a standard API within XML-RPC. The implementation of the client and server can differ, as long as the same API is used, it will work.

    SOAP is much more complex, and can also be used over protocols such as SMTP and FTP. The transport encoding is also XML, but it is much more complex because of all the options. This also makes it slow.

    REST is completely different from XML-RPC and SOAP. REST does not need a seperate server, it just needs microformats to be implemented in the output. REST is stateless. The purpose is to get data. “The best example of REST is the Internet.”

    Defining web services in Joomla! 1.5 happens in a plugin, not in an extension. A plugin is located inside the framework, where an extension extends an application. The XML-RPC application is a default implementation, which exposes functionality available in plugins specifically written to be available.

    Laurens also gives some nice examples of how to implement the client system, both in PHP and in Java. Laurens was instoppable, even after multiple reminders that he was over his time, he kept on doing things like demo-ing his very impressive SiteMAN application.

  • Dutch Joomla!Day 1

    December 8, 2006
    conferences, joomla, php

    10:48: I’m sitting here in the lobby. First session has started but I’m not really interested, so I have some time to type the plan for today:

    11.15 – 11.50: Joomla! Business Example (United Nations!)
    11.50 – 12.30: How does Google use and stimulate Open Source (Google!)
    13.30 – 15.00: Joomla! 1.5 Framework (Joomla!)

    11:20: Philippe Chabot of the United Nations is having a presentation about the CMS for the United Nations Regional Information Center for Western Europe. He explains the RIC organization, and why they chose Joomla. They looked at other CMS’es as well, and Vignette seemed nearly perfect but was too expensive. They even tried Microsoft Sharepoint Portal server, but he mentions, very politically correct, that it is “Microsoft Software, which says enough”. Now, he talks about the choice between Open Source, Commercial and custom software. He mentions Open Source might be a little less secure, but much more flexible. Custom then was discarded, so the choice would be Open Source versus Commercial. This battle was won by Open Source mainly because of the hassle of support contracts with commercial organizations and products, where in Open Source this is open. The cost of the complete project of this website cost €20.900.

    Stats for the current site: 50.000 unique visitors, 80.000 visits. The project was successful enough to also start similar sites for other regions, such as Africa.

    Some custom components were created, for instance so that interns can do content entry without having access to the backend. 

    11:52: Leslie Hawthorn of Google starts her presentation. Google uses a lot of Open Source: Python, C/C++, Linux, Mysql, Subversion, etc. Gubuntu, which is supposed to be some Google Linux Distribution, is simply Ubuntu with some custom scripts for the Google Engineers to work on.

    Google uses Open Source for independence, adaptability, secrecy (no licenses mean no one knows how many servers Google has), quality (more eyes mean more people that might find and fix bugs), time-savings and roots. Code.google.com is the place to be for information about this.

    Not everything is released to Open Source, because of several reasons:
    – Business reasons
    – Regulatory reasons (export to for instance terrorism supporters)
    – Other reasons (for instance code that is not useful anymore)

    Google supports Open Source to keep competition alive, to reduce the importance of proprietary development on the desktop, to attract employees, as a pre-training (people who worked on Open Source projects will know how to work in a team), and of course it’s good PR.

    Engineers decide themselves if code goes open source. Little hierarchy means more decisions for engineers. Of course, extra checks are done such as legal checks, quality checks, etc etc. A project is then created on the Google Code website and the code is released.

    Google supports Open Source also by donating money to Open Source projects, computer science research, hosting open source conferences & events, and they run the Summer of Code program.

    15:34: The presentation of Johan Janssens is accompanied by a paper which is also available online, and once I have the link I’ll post it here. This session will be not too technical, but a mix between business and technique. It will evolve around philosophy, architecture and framework.

    Architecture of the 1.5 framework is based on DRY principles. 

    The philosophy is “Joomla is the MacOS of the CMS systems”. It’s not to compare it with Mac, but that Joomla! has a few layers that are flexible and that not everyone will be exposed to every layer.

    Joomla 1.5 framework is, as they say, fully UTF-8 compatible using some nice workarounds for the lack of UTF-8 support in PHP. They use a third-party library for this.

    Joomla 1.0.* is basically one file with all the basic functionality: Joomla.php. Joomla 1.5 has a thought-out framework setup. 

    Johan goes on to describe the Joomla! CMS and framework structure. Interesting discussions on PHP5, design patterns etc. take place while discussing the new framework setup.

    Interesting things for the future: Versioning for content, not just a history, but some kind of branching. A simple workflow implementation. Actual user management done right with ACL.

  • Joomla!Days ahead

    December 6, 2006
    conferences, joomla, opensource, php, technology

    Friday and Saturday the dutch Joomla!Days are happening in Den Bosch. As a company that does a lot with and owes a lot to Joomla! my employer is one of the main sponsors of this event, and most of the employees will be attending the conference. We will even have a stand there!

    There are two days, friday is the “business day” and saturday is the “community day”. I am looking forward to both days, with interesting sessions on both. What I am especially looking forward to:


    Leslie Hawthorn (Google) on how Google uses and stimulates Open Source
    Lead developer Johan Janssens on the Joomla! (1.5) Framework

    I might also drop in on the community day sessions on Web Services and the migration from Joomla! 1.0 to 1.5, since our company has a lot of Joomla! 1.0 websites currently running with custom components.

    I’m not sure yet if there will be wifi, but if so, I might do some live logging on how the day is and what the sessions are like 🙂

    If you’re also going, do come and say hi to me. I’ll probably be hanging out at or around the Dutch Open Projects stand during the breaks, or if not, then someone there will be able to point you to me 🙂

  • Using helpers in actions (Symfony)

    November 30, 2006
    frameworks, php, symfony, technology

    We recently had a weird situation here at work where we needed to use the Url helper of Symfony inside the actions.class.php of a module. This helper is available in the view, but not in the actions class by default.

    Of course, we can include this, and this was my first approach. Simply using:

    include_once('symfony/helper/UrlHelper.php');

    worked fine for me. However, when my co-worker updated his code from Subversion, it went BOOM. He got a rather annoying FATAL error about not being able to redeclare a function. It’s weird, because it worked in my situation.

    The solution is simple though, and was available in the Symfony trac. Ticket #899 contains the solution, which is more simple than you could imagine:

    sfLoader::loadHelpers(array('Url'));

    Simple!

  • Being led by mixed emotions

    November 29, 2006
    personal

    For a long time already, Marjoleins grandpa is having trouble with his health. He has been in and out of hospitals quite a few times over the past years. On multiple occasions we visited him and expected this to be his last hospital visit. And every time, the man again was able to get out of the hospital and live his life.

    Last weekend, he was again taken to the hospital. When Marjolein came back from visiting him last sunday evening, she told me this was worse than before. And indeed, the hospital also thought so. On monday morning, his kidney and heart activity was lessening to dangerous levels. They called that if we wanted to visit him, we better do it quick. So I took off from work expecting the worst.

    Arriving at the hospital in the ICU, in the hallway already we heard him joking to the nurses. He definitely did not look as bad as we expected him to be. He joked and seemed very much alive. When asked, he did mention having pain even though he was on morphine, but he definitely was much better when compared to sunday evening.

    It’s amazing. Because since then, he’s getting stronger again. If he keeps up like this, he’ll be moved out of the ICU into a regular room again. He’s almost off the morphine, and even though he still does not feel very good, definitely does not feel as bad as before either.

    The emotions are kicking you around though, sadness expecting to lose him, then happiness at him seeming to survive again. It’s very hard to cope with such sudden mixtures of emotions. Whenever it is my time to go, let me go suddenly. It’s a single emotional blow, but in the end much better than this.

  • Small book markets can be so much fun

    November 26, 2006
    books

    Every few months, there is a small local book market here in Woudenberg. Last saturday, another market was held. As every other time, I was there to have a good look at the books available.

    The great thing about this market is that it’s not organized by booksellers. It’s organized by a small musicians club (for lack of a better translation of the dutch word “fanfare”). They get books from members and other nice people to sell as a fundraiser. Book prices range from 0.10 euro up until a few euros, or sometimes 10 or 20 euros for special books. You never find “true” antiquities there, but for people who like both novels and literature, both in dutch and english, there’s always something nice to find.

    Aside from a few novels that I found and which I may or may not read, I was very, very happy to find a hardcover version of a dutch translation of Tolstoy‘s War and Peace. For a whopping 2 euros! Now that was a good find. I’ve never read it before, and it’s a big big book, but I really want to read it sometime. This is my chance to do it 🙂

  • Elections

    November 22, 2006
    politics

    Elections in The Netherlands is always very interesting. With a majority of the votes having been counted, I guess conclusions can now be made. Even though the biggest party (christian democrats) was in the past government and lost votes, they still got the most votes. Their partner parties however lost a lot of votes and we will not see them back in the government.

    These elections were the first where I deviated from my “standard” vote until now. Instead of voting for the Greens, I voted Socialist Party this time. And with me, a lot of others as it seems. The socialist party grew from being the 6th or 7th party in the country to the 3rd party! A good thing, and a sign that the dutch are fed up with the anti-social government of the past years. I am happy about this.

    The most obvious government we will get now, however, might be a very christian government. The Christian Democrats would be combined with the Social Labour and the Christian Union, who are also quite socialist in nature. We’ll have to see how this works out, but it doesn’t look bad. I’m not happy with the very religious impact, but the fact that a huge part will be socialist is a good sign.

Previous Page
1 … 40 41 42 43 44 … 61
Next Page

skoop.dev

  • Bandcamp
  • Mastodon
  • Bandcamp