skoop.dev

  • About
  • @skoop@phpc.social
  • Connecting to Azure

    May 20, 2010
    azure, mediterra, php, phpazure, symfony, twig, winphp

    I was a bit afraid that it would be quite hard to connect to Azure Storage for my app, especially with the deadline looming in less than two weeks. My anxiety turned out to be without reason, mostly thanks to the great work of PHPAzure in abstracting away all the complicated stuff. Really, it is all about knowing which classes to use, which calls to make, and how to set it up. The PHPAzure documentation is a bit minimal, but with a bit of digging and trial-and-error it is actually quite easy to connect to Azure Storage.

    What didn’t help was a bit of confusion on my side on what I should use. I had mistaken SQLAzure and Azure Table Storage for some reason, and was trying to connect to Table Storage while having set up SQLAzure. Obviously that didn’t work but after correcting that situation, I ended up having it set up correctly, all of it, and being able to connect to Azure Table Storage.

    One open topic until yesterday was also my way of handling layout. I’ve decided that at least for page content I now use Twig. I might switch the page layout to Twig as well in the future so that all the layout-logic is done by a single system, but that’s for later. 

    I did a push yesterday which will allow people to actually list, create and delete tables in Azure Storage. I don’t think Azure allows for table edits (which would make sense since the name is the identifier in most cases, and it’s the only thing you would be able to edit). Next up will be to list entities in the tables. I have to research a bit more, but as I see it right now, at least in the first version for entities you will be able to list and delete. Once that is done, I will be moving on to Blob storage, and I’m really looking forward to starting on that one. 

  • Getting some output

    May 12, 2010
    mediterra, php, phpazure, symfony, winphp

    First of all, I didn’t want to reinvent the wheel for some basic stuff. So I did some research and ended up using several libraries:

    • phpAzure: A library for connecting to Windows Azure services
    • symfony request handler: Handling requests
    • symfony response handler: Handling responses

    Using this, I’ve created a basic system that allows me to easily handle the request with a single front controller, delegate the actual execution to a controller, then pass back (a decorated version of) the content the controller returns to the client. Since that is pretty much what a single call to the application should do, this means I have the basics covered.

    After having the basic setup up and running, it was time to configure IIS to actually start serving content. I was happily surprised that, because I was using the Web Platform Installer, PHP was already fully configured and the only thing I needed to do was change the document root on the default “site” (which is the IIS term for Apache’s VirtualHost) to my local clone of MediTerra, and restart the site. Pointing my browser to “localhost” then did the trick! Now that was easy!

    Of course, the app still doesn’t actually do something so my next task will be to start implementing actual functionality into the controllers to manage the content of Azure Storage. This will be something for my next WinPHP session. 

  • Your error page can be better

    May 9, 2010
    errors, php, symfony, zend framework

    Today the Giro d’Italia is coming through our province (Utrecht). For this, a special website was set up which gives information on the route and all kinds of related topics. I wanted to check on the info, but instead of getting the main site, I got this:

    Posted using Mobypicture.com

    Now, with sites like this you never know what kind of loads you can get. There are solutions for that (cloud computing would apply well here) but that’s not what I wanted to talk about. I wanted to talk about what I’m seeing in the above image…

    Your average visitor will come to your site expecting information. If something goes wrong (which can always happen), they only need to know that something went wrong, and perhaps they should get a phone number or e-mailaddress where they can report the error. At the least, the visitor should be informed of the error in the design of the rest of the website, so that they are aware of the fact that this error is indeed generated by your website, and it’s not a problem on their side for instance.

    The thing is, most people won’t know what MySQL is, or which database is giving an error here. For all they know, a database could be part of the browser, and MySQL could be some kind of code for the error.  It gets worse when with some applications full exception stack traces are outputted, sometimes including database credentials. Not only do you give the average visitor information they don’t need, you also give malicious users a huge amount of information they can use to try and get into your application.

    If you are working on a website or an application, you should output all that information in your development environment. But before moving to production, this should be switched to a simpler, more user-friendly error-page. Now frameworks such as Zend Framework and symfony have special settings for that using different environments, which makes it really easy for a developer to switch between the developer-view of an error-page and the user-friendly one. Perhaps more systems, including CMS-es, should pay more attention to this. But in the end, it is also the responsibility of the developer to keep this in mind. Next time, before you deploy a new version of your application, consider the error page, and think about what it should and should not expose to your average visitor.

    Update: It’s not just your application that you need to check, and so I found out the hard way right after publishing this article and running into some Nginx error 500 pages. I’m going to read up on Nginx configuration soon 😉

  • Setting up my Windows environment

    April 22, 2010
    azure, php, windows, winphp, wpi

    As I don’t have any spare hardware on which I can install Windows, setting up Windows for me meant creating a new Parallels virtual machine on my iMac. On that VM, I installed Windows Server 2008, of which I still had a copy lying around.

    The easiest way I had heard of to get a server environment up and running must be the Web Platform Installer by Microsoft, which you can use to easily install IIS and PHP. So, I downloaded the Web Platform Installer and used it to install IIS and PHP. It was indeed pretty easy to install all the things I needed, with automatic installation of dependencies, however it was a nuisance every once in a while, because several of the components I had to install required me to reboot my Windows. All in all, I think I had to reboot 4 times to get my platform up and running. When twittering about this, I did get a response from Josh Holmes that it was not supposed to do that, so I am not sure what happened there.

    Since I am using Github for my code, I also needed to get Git up and running. Now I heard horror stories about running Git on Windows but actually it is quite easy as it turned out. It is just a matter of installing mSysGit and off you go. I especially like the Git Bash commandline that gets installed that way (which I’m really used to while working with Git on Linux and OSX).

    After having cloned the MediTerra repository, it was time to install an IDE. Lately I have become a fan of the Jetbrains PhpStorm IDE, and since they have a Windows build available I decided to install that one. Starting it and creating a project from the cloned MediTerra repository worked fine and it seems PhpStorm runs like a charm, just like it does for me on Linux.

    Since I am building an application that is supposed to run on Windows Azure, and I want to develop my application without having to deploy to Azure itself all the time, I also need the Azure SDK. I downloaded the SDK and tried to install it, but found out it has some dependencies that I needed before being able to install the SDK. The first one (.NET Framework 3.5 SP1) was listed on the SDK page (stupid me, I should’ve read), was an easy download and install. The second one was MS SQL server, of which the Web Platform Installer has an easy installation option. Luckily the Web Platform Installer is really as easy as opening the WPI installer, selecting the package you want and click install. It takes a short bit but then you’ve got it installed and up and running. 

    The installation of the Azure SDK was pretty straightforward after that. Well, I ran into a strange problem where the SDK installer would basically stall on checking for diskspace requirements, but there’s nothing a Windows reboot does not solve 😉 and after that, the SDK installed fine. One bit of feedback towards Microsoft though: Get the Azure SDK into the WPI to make it all even easier.

    So now I have a seemingly running local environment. It’s time to start working on the code. This is where I’ll leave it now, and start with my next blogpost.

  • Introducing MediTerra

    April 8, 2010
    azure, mediterra, microsoft, php, winphp

    First of all, I’ve decided to name the app MediTerra. I didn’t want to use the standard php* type of naming. Since I’m going to be building on the Windows Azure technology, I let my thoughts go a bit. Now, in the mediterranean, the color of the sea is the sort of blue that some might call azure, which led me to consider variations on that, which ended with MediTerra. It sounds nice, and has absolutely nothing to do with the application that I’m going to build other than the technology it is built on 😉

    So what is it going to do? In short, one could look at this application as the phpMyAdmin for Azure Storage. Basically, what I want to do is build an application that can help you manage your Azure Storage entries. List them, show them, edit them, delete them, add them. And any functionality around it that might be useful to you. It will mostly be a tool for developers obviously, so if you have any feedback on what you think would be useful for this, I would love to hear it!

    During the development (and afterwards) I will be sharing the code on Github. So at any point, you will be able to pull the code or even fork it if you want to.

    So there you go. Now it’s time for me to set up my Windows development environment, to see how I can get all of this up and running. I’ll report back on that experience later.

  • Speaking at PFCongres 2010

    March 30, 2010
    conferences, pfc10, pfcongres, php

    In the past years the event has been amazing and I have a full trust that this year won’t be any different. With speakers such as Paul Borgermans, Mike van Riel, Christian Heilmann, Jan-Willem Eshuis, Mihai Corlan, Harrie Verveer, Bram Veenhof and many more on topics such as Database Control, Scrum, Flex, Dependency Injection and DSL the event promising to be awesome again this year. And with this year being the fifth consecutive year for the conference there is a birthday to celebrate! 


    If you’re into web development (PHP, Javascript, Web standards, Flex, Microsoft, Project methodologies, mobile, documentation) then Pfcongres might be an interesting conference to attend. With a price of only 37.50 EUR (30.00 EUR for Pfz members) it really is a steal. There is no reason for you not to be there! So register now, and I’ll see you there!

  • Entering the WinPHP Challenge

    March 29, 2010
    azure, Dutch PHP Conference, php, windows, winphp

    It is no secret to people that know me a bit that, despite the fact that I work solely on OSX and Ubuntu, I have some friends in the Microsoft camp. So far though, I never really felt the need or will to start working with things Windows-related myself. 

    When Microsoft announced they’d be running the WinPHP Challenge again this year, I quickly discarded the idea of entering because I don’t use Windows anyway. However, after having seen two talks (one by Rob Allen and the other one by Josh Holmes) on Windows Azure I got at least a bit interested in how it would be to work with this technology. Having gone over the idea of it a bit more, I decided to take the plunge and make the step out of my comfort zone. And what better way to do that than to enter a challenge. After a bit of thinking, I was able to come up with a nice idea of an application I could create that would not just benefit myself but would be useful to others when open sourced. After some initial thinking on the name, I ended up with all the information needed to register in the challenge.

    It will be an interesting experience: Having not worked with Windows for some years (4 or 5 I believe), let alone with other Microsoft technologies such as IIS, and not at all with cloud services let alone Windows Azure, I will be forced to really dig into all this to make it happen. I really want to take this step out of my comfort zone though, and see what I can do when I completely switch to a new platform and a new set of technologies. I’ll be blogging about the experience here as well, so you’ll be able to follow what I’m doing.

    If you’re interested as well: There is still a couple of days left to enter the challenge. Have a look at the website and take the plunge: There’s some interesting prices attached as well, with the winner getting a trip to the MIX11 conference in Las Vegas!

  • An open letter to the phpBB community

    February 19, 2010
    community, framework, open source, php, phpbb, symfony

    Hey phpBB community,

    It has been a long time since I logged in here (I haven’t checked, but it must’ve been years). I’ve had great years here at phpBB back in the days of phpBB2 as a user, Support Team Member and Support Team Leader, and even though I have moved on since, phpBB and its community still have a special place in my heart.

    When I first heard of the possibility of phpBB moving towards Symfony some weeks ago, my heart skipped a beat. This was great news! Of course, nothing is set in stone yet, but truely it would be a great move. Let me try to give you some reasons why it would be a good idea to rebuild phpBB on top of Symfony, and let try to offer some response to those with specific fears. 

    Don’t reinvent the wheel

    Using an existing open source framework for any web application is a good idea. The framework will take a lot of work out of the hands of the developers, allowing the developers of phpBB to focus specifically on the forum functionality they want to implement. This will allow for better code (since they can focus just on the interesting stuff), less code to maintain (since the framework contains a lot of the generic functionality) and also a faster release (because less code has to be written). Most frameworks and specifically Symfony focus on implementing the best practices of (web) development, and promote the same for code written on top of Symfony in projects. Result: Better, more understandable and extendable code which runs faster. For those that don’t know a lot about technology: What this basically means for end-users: You will have a discussion forum that has little bugs, little security issues, that will allow you to have plugins/MODs without the need to edit specific files or the chance that an automatic installation fails because it can not correctly edit files. 

    Benefit from the existing Symfony community

    Adopting Symfony as the basis for phpBB4 would mean you can tap into the power of the existing Symfony community. This has a lot of benefits. The most important one is that the basis of the phpBB4 code would be maintained by the Symfony community, not the phpBB4 developers. This is not meant as a stab towards the phpBB development team, because they’re doing an awesome job. This simply means that there is more time for the phpBB development team to focus on their code. The framework itself will be maintained elsewhere, and the phpBB development team can simply pull in new fixes and new features and immediately make use of them for phpBB. Obviously, this also means that phpBB developers can, if they want to, contribute things to Symfony (the benefit goes both ways 🙂 ). 

    Another benefit the phpBB community will get from using Symfony is the fact that the target audience will be much bigger all of a sudden. And since the majority of the Symfony community are developers, this means there is all of a sudden a huge group of developers available that might be interested in helping out with the development of phpBB itself or one of the many MODs. This will mean more help for the phpBB developers, both the official team and the community developers that contribute. 

    Opening up a new market

    phpBB has been serving a huge market of online forums for all of its life. Whether it was a small local community forum or a huge million-user forum, phpBB was there. But one market has seen very little coverage by phpBB: The enterprise market. This is a market that has traditionally been for Java, .NET and similar languages but has recently been moving towards PHP more and more. So far, the market has been mostly for custom PHP framework development, especially Zend Framework, Symfony and such. And this is the market phpBB could step into. By having phpBB be based on such an enterprise-level framework, it will make it much easier for developers working with such a framework to integrate phpBB into their software. Now, the enterprise market values quality of quantity/speed usually, so this might make the quality of the phpBB code even better.

    Extending phpBB with symfony code

    Symfony has an extensive database of plugins, similar to phpBB MODs. If phpBB would adopt Symfony, then these plugins would all of a sudden available to users of phpBB. With a simple installation system this will make it very easy to start using this functionality. 

    Hard to learn?

    I’ve seen mentions of people fearing Symfony is hard to learn. Symfony is known for its great documentation. Both for people new to Symfony and for people that already have some experience with Symfony. Also, Symfony 2, which would be the basis of phpBB4, is much easier to learn than symfony 1.*. Yes, for people not used to frameworks, it might take a bit of effort to learn. But these same people have taken the effort to learn the phpBB API. I would dare say that the Symfony API will be much easier to learn, and the documentation for it is better. 

    Distribution problems?

    Distribution for Symfony is very easy. For symfony 1.*, there are several open source packages available that offer a symfony plugin (for usage in symfony projects) as well as a stand alone package. And with the newer versions of symfony 1.*, it is even possible to offer a simple installer. Symfony 2 will simpify this even more, as it will be even more flexible for the distribution of either plugins (called Bundles in Symfony 2) or stand alone packages. So there is no reason about the ease of the distribution.

    Security

    Symfony has only seen one or two security releases so far. Because Sensio, the company that is backing Symfony, is mostly delivering to the enterprise world, security is a big focus for their development. This means that the framework they use for their projects will have a huge focus for security issues. The releases I’ve mentioned so far were not even about security vulnerabilities inside the Symfony code itself, but about external libraries that are bundled with Symfony. Even if something might pop up, the Symfony team is very quick to respond to such issues and make a new release for it.

    Concluding

    I hope this offers enough information to you. If there are any more questions, I am more than happy to answer any of them, or point you to the answers if they have been given already somewhere else.

    Full Disclosure

    As mentioned before I used to be a part of the phpBB team as Support Team Member and Support Team Leader. At this moment, I am a member of the symfony team as the Symfony Community Manager.

  • Laying down some PHPat beats

    February 3, 2010
    facebook, hiphop, performance, php

    Over the years there’s been a lot of tools to improve the performance of PHP. Sometimes, these were tools specifically aimed at PHP (such as APC or the Zend Optimizer), at other times we’ve been hooking into existing tools (such as Memcache). But in all these situations, the actual PHP code was left alone and deployed in the traditional way of putting the PHP files on a server that is able to parse the PHP files on each request. There have been other initiatives to compile PHP (such as Roadsend) but for some reason there was no big adoption. I think this might change with HipHop for PHP.

    One reason for things like RoadSend not to get a huge adoption figure is obviously because it requires a lot of control over the server you deploy to. And since the majority of PHP users deploy to shared servers with limited control over their server, there is little that can be done to actually use it. Another reason though is because most probably many people did not know about Roadsend and similar initiatives. Even in the larger companies that I’ve worked for in the past, I’ve never really encountered it so far, and it wasn’t until recently that I bumped into Roadsend.

    But with the rise of Virtual Private Servers and the dropping prices of dedicated servers, more and more people are taking control over the environment to which they deploy their PHP applications, whether business or private. And with that, initiatives such as Roadsend and HipHop for PHP get more leverage. And actually they become more useful, because in a VPS, every little bit of resource counts, so when there are tools that can save some resources, people are more inclined to start using it.

    Still, HipHop for PHP might not be for everyone. First of all, because not every PHP application will be able to use it (HipHop for PHP can not convert all PHP to C++ code. Things such as eval() won’t work). But also, because it won’t be necessary for everyone. If you’re just running your personal blog, I’m not sure HipHop for PHP will be for you. It might be able to help, but with a regular blog the difference might not be so big, especially given the hassle it will take to use it. Keep in mind that you’ve have to convert, compile and deploy for every little change to your script.

    So where can it be really useful then? I foresee a lot of use for HipHop for PHP in PHP-based backends. PHP applications that have a multi-tiered architecture can benefit from HipHop for PHP. The front-end could be a pure PHP implementation. This makes it easy to change the front-end. The back-end services on the other hand could be HipHop for PHP services that expose data and/or contain the business logic. This is the part of the application that doesn’t change as much as the front-end, so the overhead of converting and compiling is more worth it. And this is also the place where big performance hits are usually taken, making it even more interesting to speed up that part of an application. 

    It might even be that, with the above in mind, more people will go for a more service oriented approach to their application, finding out performance bottlenecks in their application, converting them to isolated components and turning those into HipHop services. 

    And this is where I hope HipHop for PHP will help PHP development in general, even for those that will not actually use it: It might make people give more thought on architecture, on nice and isolated components that can be easily replaced or refactored without having to change the whole application. Even when people end up not using HipHop for PHP, the fact that it is available and people know about it may make people consider their application architecture.

    Now it’s just waiting for the sources to become available, so that everyone can start playing with it. 

  • Organizing your own conference

    February 1, 2010
    conferences, php, phpbenelux, phpbnl10, symfony, symfonycamp

    I think the idea started years ago. In the orinal Dutch PHP usergroup, we discussed it, but we never did it. Lack of manpower to pull it off, but I guess also a lack of willpower to want to pull it off.

    About 1.5 years ago, PHPBelgium truely kicked off and since they were already friends, we ended up merging our efforts into PHPBenelux. This is where the discussion started again, as Michelangelo and Felix were really anxious to do a conference. Of course, we were as well, and so the talk started.

    It took us a bit longer than initially planned but by last summer, the plans started to take serious shape. We started working on a date, getting our CfP worked out, and contacted the first potential sponsors. We spread out the work over the nine people involved.

    In the fall, the Call for Proposals opened, and by the november it closed again. This was the point for me where it became clear that I had to put a lot of my other activities either on hold or at least give them less time, because the conference was starting to take a lot of time.

    By halfway december, most of my free time was spent on the conference. The ticket sale had started, payments needed to be processed, speakers needed to be interviewed and announced on the site. Questions needed to be answered and by the end of the early bird we were already sold out! Discussions on whether or not we should try and get a bigger room, being disappointed by not having the option to scale, and whatever more is involved in organizing the conference.  There have been several times where I though I must’ve been crazy to step into this whole conference organizing thing. Stress levels above any you’ve had before.

    And then it’s time for the conference. Travel to Utrecht to pick up Derick, travel to Schiphol to pick up Cal, travel to Antwerp. Meet a lot of other friends, crew and speakers alike, delegates and sponsors alike. Have a great speakers dinner at Da Giovanni in the nice city center of Antwerp. Have some drinks with some people of a company I nearly worked for. 

    After a very short night of sleep, it’s time to get up early. The sponsors need to set up their booths. The registration desk needs to be set up. All the goodie bags need to be transferred from my hotel room to the conference room. Wireless needs to be arranged. Things need to be tested. Oh wait, I need to do the opening, so I need to test my slides. 

    As soon as the majority of delegates are in, I do the opening and after that, it’s mainly a smooth ride. All the madness, all the preparations of the months before, they all pay off instantly. Most things go according to plan. Speakers are giving their talks and response is amazing. Lunch for vegetarians needs some worry but works out fine after a while. Everywhere I look I see happy faces. The people of the Ter Elst hotel and conference center are working their ass off to make the conference a huge success. And our crew as well. And the sponsors as well. And the speakers as well. And the delegates… they enjoy themselves. That’s good.

    One issue. Eric Ritchie, speaker for Zend, can not make it due to the snow that fell during the evening. Stress. Talking. Discussion. Zend guys rock: They have experience with doing talks over Webex. They quickly, set up a test setup, and things seem to work fine. During the break, they set up their computer and test everything: It works! And the delegates do not seem to mind. They seem impressed by it. But not as much as me. This is what technology is for, this is how we solve problems these days. The guys from Zend are awesome. They solve the problem.

    Cal closes the day with his keynote, after which it’s up to me to thank everyone involved. The crew, the speakers, the sponsors and most of all the delegates. They made our day. The smooth ride it was, thanks to everyone. There are gifts for the speakers. But the applause and warm response from the delegates is the biggest gift. At least for us, the crew that has organized this conference.

    But the day is not over. 2 hours of free drinks. I was amazed by the limited amount of people actually sticking around for this. But some of those who left will know they left before they should: Sponsors give away goodies by raffle. And several people are not there. They miss out on Zend licenses, and even on an iPhone. Those that stuck around are the winners. 

    Those that stuck around even longer even join in on a spontaneous bowling session. Kana all of a sudden comes by to say she’s booked three bowling lanes. We all join in on the fun. Lots of fun.

    Man, what a blast. I have not regretted a single moment that I jumped into organizing this conference. And I’ll do it again next year. Even worse, I’m doing it again before that, as I’ve also volunteered for helping in this year’s SymfonyCamp. But it’s going to be a blast. We’ll be having fun. The stress is worth all of it and more. Will I see you there?

Previous Page
1 … 20 21 22 23 24 … 61
Next Page

skoop.dev

  • Bandcamp
  • Mastodon
  • Bandcamp