More: What can PHP learn from C#?
Something to note about ASP.NET is that most of the C# programmers I know that are doing ASP are doing it without server control or the WYSIWYG interface building. Why? Because they understand that those tools are not ready to be trusted. We should acknowledge that WYSIWYG HTML editing has come a long way, especially from the MS camp (remember FrontPage97 markup?). But it still remains the majority consensus that if you build a web page you better know HTML. Even if an experienced person uses a WYSIWYG editor, they still spend time tweaking the HTML. Now days, CSS purists don’t build web pages they build unordered lists that later get styled outside the scope of HTML.
Why do I bring this up? There is always the inevitable post that says Zend Studio or whatever PHP editor should have drag and drop control creation like .NET. The simple fact of the matter is that PHP programmers should focus on programming and webmaster should focus on design. Granted, both people need to have knowledge of the other. But the way that .NET handles this is wrong from a web standards perspective. It may be clever from a certain perspective. This does not mean that it is the proper and productive way for building applications. It certainly is not elegant.
Is there a way that this could be done that would be good and proper? Maybe. This is something I think about often. I have not seen it yet. It would require a framework specific representation of such a control. Rather than have a static ‘preview’ it would be interactive. Right-click and properties or edit. If an IDE wanted to accomplish this, they would need to have some sort of framework to back this sort of thing up on the server side. With the introduction of the Zend Framework, this could be a possibility. The IDE would need to understand whatever template or MVC framework it was dealing with and what code is relevant to what you were looking at. What if Komoto or PHPed incorporated Synfony or Cake, or both? Well now that I said it, I want to see it.
As long as I am talking about IDE features, another framework specific feature would be code generation. .NET has these really grate wizards for creating data objects bound to a specific db table. I really love the concept of Qcodo, and it builds great stub forms and database objects. If you had a project that was a web site, and you had a database browser built in, you could have a wizard that creates your base database object. You could do it Qcodo style or use the Zend_DB classes. If this is already out there, I would love to know. If it isn’t, it should be. I have faith in the Eclipse PHP project and expectations for Komoto and Zend Studio.
I understand why IDE creators may be hesitant to bind themselves to a framework, but why bind to one. Make an extensible architecture that allows for more than one. That is another thing to learn from MS, silos have tunnel vision. There are a lot of things I don’t like about VS, and I have no control over changing them. Enter #develop. I have some ideas on how to make my bed with MS. Stay tuned.