Posts tagged Javascript
JS – Adapting to the situation (smart coding) with Portlet’s
Aug 3rd
Preface
For the past few months I’ve been workin with a content management portal to deliver my XHTML/JS/CSS I can’t stress how big a pain in the arse this is, as with any CMS there are limitations in the way that it works and problems when you try to use it for more than what it’s really made for. Limitations of a CMS can include:
- not being able to add code/css to the header
- the CMS just spitting out any old JS/CSS in the HTML
- HTML not being formatted correctly, or just spitting out random XHTML tags
The list could go on, but I’m too tired to really carry on. It puts a big downer on you most of all when you’re so anal that all of your HTML is well formated and perfectly indented, only to find when the site goes live, all of your code is on one line or it looks like it’s been run over by a bus.
My main concern with coding for CMS’s that use portlet’s is the simple fact that each portlet is in essence it’s own self contained application/controller. It becomes a pain when you have to constantly check to see whethter a portlet exists in the DOM on runtime.
How can you work around this? Think like a CMS. You might be thinking, what the f**k is he talking about? The simple solution is to adapt the way you code to suit the CMS. Instead of having one big JS file for a page or site section, seperate your code into small chunks, this will also help you unit test your code which I’ll come to a bit later.
More >
JS Lazy Developer
Jul 24th
With JavaScript being taken alot more seriously, we’re seeing a rise in JS best practices, the days when JavaScript would be mocked based upon annoying popup’s, really crap navigation systems that broke in every browser except IE, and seriously disgusting page effects that should stay relegated on people’s myspace pages are pretty much over. JavaScript has reached a new standard and coders are helping to drive it.
Zend Framework and DoJo
Jul 23rd
I pretty much wet my self when ZF announced that they’d be integrating Dojo with the next iteration, and low and behold the first RC was made publicly available a few days ago. I literally dived in head first today, only to find the documentation was some what lacking.
I don’t think the documentation is quite complete, but hats off to ZF for taking a step in the right direction.
Here’s a quick tutorial on using Dojo’s container’s and pane’s with ZF. I’ve added line breaks so it fits into the old blog.