 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Zend Developer Zone: Managing CSS and JavaScript files within a Zend Framework App
by Chris Cornutt February 09, 2010 @ 10:48:56
On the Zend Developer Zone there's a recent tutorial from Andy Baird looking at an interesting way to manage CSS and Javascript files in a Zend Framework application. His suggestion can help tame those larger sites where multiple CSS/Javascript files can be a hassle to maintain.
Full design control usually means large, thousand plus line CSS files that equal serious pain when it comes to maintenance or building upon. If you don't namespace your selectors carefully you'll end up paying for it down the road. And heaven forbid you apply a default HTML tag styling. So, ranting aside, how do you maintain flexibility and still keep tidy CSS and JavaScript?
He's created two helpers to, well, help with the problem. They take in the path of a CSS/Javascript file and add it to either the stylesheet list or the file list to load into the header. He also includes an example of it in action, adding multiple CSS and Javascript files to the header of a sample application and echoing them back out.
voice your opinion now!
css javascript zendframework helper tutorial
Evert Pot's Blog: Javscript's escape and encodeURI vs. PHP $_POST
by Chris Cornutt January 07, 2010 @ 14:10:46
Evert Pot came across something strange in an application he was working with - the incorrect decoding of data coming back from an Ajax call POSTed back into the app.
Basically, data is coming into our PHP application through a Javascript's XMLHttpRequest (ajax). [...] Normally everything in the $_POST and $_GET arrays is already decoded, so when you're dealing with these arrays you don't really have to think about this. This time however, I was dealing with some non-latin unicode characters and for some reason they were never decoded and ended up in the database as raw url-encoded strings.
The issue was caused by the fact that the non-latin characters were handled differently on the byte level and that, because of the choice PHP makes on which of the unicode characters to use for spaces, he found that there were two options for handling strings - escape() and encodeURI().
voice your opinion now!
javascript encode encodeuri nonlatin character
WhyJoomla.com: Adding Tweetmeme to your Joomla site
by Chris Cornutt December 31, 2009 @ 08:46:59
On the WhyJoomla.com site today Qasim Virjee has a quick tutorial showing how to add in a module to your Joomla site that talks to the Tweetmeme website with just a small bit of code.
When you take a peek at the tweetmeme page containing the necessary embed code it may not be too easy to tell how to use it with your Joomla site - and though there's a couple of plugins/extension floating around Joomla, it may not offer the flexibility you require for clean theming/templating. However, there's an easy way to go about embedding this and all it takes is a small modification of the de facto embed code.
It really just boils down to about five lines of Javascript that can be customized to pull just the information you want (like article templates or article lists). Then it's just a simple matter of dropping it into your template and adding it to the site.
voice your opinion now!
tweetmeme joomla javascript template
NETTUTS.com: Tools of the Trade Web Development Frameworks that the Pros Use
by Chris Cornutt December 18, 2009 @ 08:15:56
New from NETTUTS.com today there's a new article listing out some of the tools of the trade, the frameworks that web development professionals use (and not just with PHP).
New web development frameworks, promising rapid development and easy deployment, are sprouting out at a more rapid pace than you can keep up. In the last article, we looked at the various factors you'd have to consider when deciding on a framework. Today, we are going to look at the various frameworks available for each facet of web development.
PHP tools that made the list include CakePHP, the Zend Framework, Kohana and Symfony. Frameworks from some of the other languages include ASP.NET, Ruby on Rails, jQuery and Blueprint.
voice your opinion now!
framework php ruby javascript asp css
Pablo Viquez' Blog: How to use json_encode with ISO-8859-1 data '" Part2
by Chris Cornutt August 03, 2009 @ 07:57:10
As he mentioned in a previous entry on his blog, Pablo Viquez found a few issues with character encoding and the json_encode function. He revisits this in a second look at getting it to cooperate with ISO-8859-1 data.
One solution that I did, in order to preserve the character set was to encode the data before using the json_encode function to use just A-Z, a-z and 0-9 characters, instead of sending text with accents or symbols. One encoding that fits perfectly in this schema, is Base64 Content-Transfer-Encoding. (see base 64 explanation below) This leads me to the solution: Encode the ISO-8859-1 using base64 and decoded in the client using JavaScript.
He includes both a code example for his solution and downloadable code for you to try it out yourself.
voice your opinion now!
jsonencode iso88591 javascript tutorial
Noupe.com: How To Create Your Own Stats Program (JavaScript, AJAX, PHP)
by Chris Cornutt June 17, 2009 @ 09:30:36
There's a new tutorial from Noupe.com today that walks you through the process of making a customized statistics program by combining HTML, Javascript (some Ajax) and PHP. In this case, they're looking to track the visitors to a website.
When creating a website, one main goal is to attract visitors. Traffic generation is a necessity for monetary purposes, showing off your work, or just expressing your thoughts. There are many ways to create traffic for your website. Search engines, social bookmarking, and word of mouth are just a few examples. But how do you know whether this traffic is genuine? How do you know if your visitors are coming back for a second time?
The application they help you build (demo here) doesn't do any graphic with the data, so you'd need an external tool like JPGraph to create it. It does, however, provide you will the complete code to not only count the total visits from an IP but also which resources were hit and how many times they've been accessed. The backend is a SQLite database accessed through PHP.
voice your opinion now!
ajax javascript tutorial statistics
Zend Developer Zone: Using JavaScript in PHP with PECL and SpiderMonkey
by Chris Cornutt June 04, 2009 @ 12:06:38
On the Zend Developer Zone today there's a new tutorial from Vikram Vaswani about using the Spidermonkey Javascript engine together with the PECL extension for it to create a few simple examples.
Not too long ago, it seemed like there was a pretty clear distinction between client-side technologies and server-side technologies. [...] Things aren't that clear any longer. [...] And in this article, I'm going to show you how to add a JavaScript engine to your PHP build, with a little help from PECL's SpiderMonkey extension.
The PHP extension lets you use the libraries (with your PHP 5.3+ installation) to directly create new objects and work with the Javascript like it was PHP. The end result is then passed out to the browser via a "evaluateScript" call. He illustrates how you can use objects and generate XML quickly and easily.
voice your opinion now!
pecl tutorial spidermonkey javascript
|
Community Events
Don't see your event here? Let us know!
|