The Information Technology Blog brought to you by 4 Ace Technologies
Tuesday, September 27, 2011
Web, Mobile, and Offshore Development Services Blog
Thursday, March 31, 2011
Automated PHP Deployment - Capistrano
Automated PHP Deployment With Capistrano
Sure, I’d like to spend my days and nights writing Ruby and cap deploy ing it to success, but I have to face the facts.
I Still Have PHP Apps To Maintain.
I have no one to blame but myself. I wrote them. And I still work where they were written. There’s no escape. After using Capistrano more than one time, you’ll be completely spoiled.
But Capistrano is only for crazy Rails apps right? Nope. Its simply a platform for automation. It just so happens that deployment usually requires quite a bit of steps. Hmmm…lots of steps…automation… a match made in heaven. So sure, Capistrano was thought up with Rails in mind, but created openly so you’re able to use it any way you’d like.
Capistrano’s power is in its remoting features. You tell it what to do on that other server, and it does it. Beauty. So, if your PHP deployment process requires an svn export combined with a few other repetitive steps you have to do every time, Capistrano is here to help you too.
Without going into all the details of Capistrano (following the link will give you a nice overview), it uses a deploy script (recipe) to understand your deployment environment and required tasks.
Ok ok ok, Lets Get On With It
So, we have a PHP app that we need to deploy to server X. It needs to be sucked out of its repository, its version symlinked to a doc_root, and then a shared directory symlinked into the site. This is a pretty common deployment scenario, so lets go with this.
First, we need a Capistrano recipe. Currently, it can only be auto generated for a Rails app, so psst, here it is. Download this and create a directory at the root of your PHP app and name it config.
mkdir config
cd config
wget http://maddox.s3.amazonaws.com/sites/deploy.rb
Capistrano wants its recipe to be in the config directory, so do as it likes. Now lets open it up and make it work with us. Once again, a complete description of the Capistrano recipe file is bit out of scope for this little post, so please read up.
We’ll edit all the normal items
set :application, "php_app"
set :repository, "http://code.phpdevelopers.com/#{application}/trunk"
We only deploy to one server, so edit…
role :web, "phpsite.com"
Now you need to add the directory you want to deploy to. Add…
set :deploy_to, "/home/www/#{application}"
Capistrano defaults to checkout when pulling from subversion. I prefer an export, if you do too, then add…
set :checkout, "export"
Ok, so if you’re familiar with Capistrano, you know exactly what we did. If you’re not, the most important thing to know is that Capistrano is going to suck your code from the repository defined, do everything it’s told to do in /home/www/php_app on your deployment server, phpsite.com.
Set’r Up
Believe it or not, we’re half way done. Next, lets let Capistrano get the directory we just defined ready for its magic.
cap setup
If you look on your deployment server, you should see 2 directories that were just created.
drwxrwxr-x 2 user group 4096 Aug 16 01:48 releases
drwxr-sr-x 4 user group 4096 Aug 16 01:48 shared
WOW! We’re already saving time! releases is where your app will be sucked down to. Capistrano exports your PHP app into a directory named after the current date/time. Each version you deploy will be kept in this directory. Shared is where you can keep files like uploaded assets or images that aren’t kept in your repository, but need to be around every time you export from subversion. If your users upload files all day long, and you redeploy your PHP app from subversion, all your uploaded files will be gone. So we keep those in here.
Here’s the deployment rub. Every time you deploy, you have to go symlink these directories from your /shared directory, into your current version of your PHP app. And a small bit of math can calculate the complexity when you start adding 2,3, or 6 asset folders. Yuck.
That’s where Capistrano helps ya out.
Capistrano, Take Me Away
Ok, so our deploy directory is set up and ready to get our files. Now we need to tell Capistrano exactly what to do when we deploy. Get it? Recipe…
Define a new task called deploy
desc "This will deploy the app"
task :deploy do
end
Inside the block we’ll just tell Capistrano exactly what it needs to do in order to deploy our app.
desc "This will deploy the app"
task :deploy do
run "svn --quiet #{checkout} #{repository} #{release_path}"
run "ln -nfs #{release_path} #{current_path}"
run "ln -nfs #{shared_path}/photos #{current_path}/photos"
end
Ok, lets walk through exactly what this does. First, Capistrano uses subversion to suck your app out of the repository and into the releases directory. That releases_path is just a nice convenient variable for /home/www/php_site/releases/200608162012. Next, it will create a current symlink to that version of your app in the releases directory. Then we told it to symlink the directory photos from shared into the current version of the application.
And since you’re hosting a PHP app with Apache (a 99% guess), there’s no need to restart any servers. You’re done. You’re new version will be deployed safely and linked. The IMPORTANT thing to note, is that your new doc_root for your site will be /home/www/php_app/current.
Deploy!
Now, all ya gotta do to redeploy your site is…
cap deploy
Capistrano will go on to do everything you told it to do, on your deployment server. When its done, your directory should look like this…
lrwxrwxrwx 1 user group 42 2006-08-16 01:32 current -> /home/www/php_site_/releases/200608162012
drwxrwxr-x 4 user group 4096 2006-08-16 01:31 releases
drwxr-xr-x 4 user group 4096 2006-06-24 02:08 shared
And there you have it. Automated PHP deployment, with one simple command. Peering inside the current directory, you’ll see where the photos directory has been symlinked into it.
The moral is, Capistrano isn’t just for Rails deployment. Its powerful remote execution can be exploited to do anything you want. While our Rails apps get a lot for free when it comes to recipes, creating your own isn’t complicated. Especially if its replacing repetitive tasks you’ve done over and over and over and over and over again.
Wednesday, November 18, 2009
9 Most Common IE Bugs and How to Fix Them
Author: Siddharth
Original Article is at: http://net.tutsplus.com/tutorials/html-css-techniques/9-most-common-ie-bugs-and-how-to-fix-them/
1. Centering a Layout
Centering an element is probably something every web developer has to do while creating a layout. The easiest and most versatile way to center an element is to just add margin: auto; to the relevant element. The above method will take care of centering the element irrespective of the resolution and/or browser width. IE 6 in quirks mode however decides to handle this in the most unfortunate way possible: by not handling it at all.
Consider the Following Code:
- #container{
- border: solid 1px #000;
- background: #777;
- width: 400px;
- height: 160px;
- margin: 30px 0 0 30px;
- }
- #element{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 300px;
- height: 100px;
- margin: 30px auto;
- }
#container{ border: solid 1px #000; background: #777; width: 400px; height: 160px; margin: 30px 0 0 30px; } #element{ background: #95CFEF; border: solid 1px #36F; width: 300px; height: 100px; margin: 30px auto; } The output you'd expect:
But what IE actually gives you:
This is mainly due to IE6 in quirks mode and below not recognizing the auto value we set to the margin property. Fortunately, this is easily fixed.
The Fix
The easiest and most reliable way to center content for IE6 and below is to apply text-align: center to the parent element and then apply text-align: left to the element to be centered to make sure the text within it is aligned properly.
- #container{
- border: solid 1px #000;
- background: #777;
- width: 400px;
- height: 160px;
- margin: 30px 0 0 30px;
- text-align: center;
- }
- #element{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 300px;
- height: 100px;
- margin: 30px 0;
- text-align: left;
- }
#container{ border: solid 1px #000; background: #777; width: 400px; height: 160px; margin: 30px 0 0 30px; text-align: center; } #element{ background: #95CFEF; border: solid 1px #36F; width: 300px; height: 100px; margin: 30px 0; text-align: left; } 2. Staircase Effect
Almost every web developer uses lists to create his navigation. Usually, you create the container element, create some links inside and then float the anchors in the direction he wants and calls it a day. Usually. IE though decides to make it a lot more complicated. Peruse through the following code:
- <ul>
- <li><a href="#">a>li>
- <li><a href="#">a>li>
- <li><a href="#">a>li>
- ul>
- ul {
- list-style: none;
- }
- ul li a {
- display: block;
- width: 130px;
- height: 30px;
- text-align: center;
- color: #fff;
- float: left;
- background: #95CFEF;
- border: solid 1px #36F;
- margin: 30px 5px;
- }
ul { list-style: none; } ul li a { display: block; width: 130px; height: 30px; text-align: center; color: #fff; float: left; background: #95CFEF; border: solid 1px #36F; margin: 30px 5px; } A standard compliant browser renders it like so:
And the IE screen shot:
Not a particularly pleasing navigation if you ask me. Fortunately, there are 2 fixes you can try.
Fix #1
The easiest way to combat this is to float the li elements themselves instead of the anchor elements. Just add this and you should be done.
- ul li {
- float: left;
- }
ul li { float: left; } Fix #2
The second way is to apply display: inline to the enclosing li element. In addition to fixing this bug, it also fixes the double margin bug mentioned below. Purists may not like placing block elements inside inline elements though.
- ul li {
- display: inline
- }
ul li { display: inline } 3. Double Margin on Floated Elements
This bug is probably among the first ones a web developer starting out will run into and is specific to Internet Explorer 6 and below. Triggering it is as simple as floating an element and then applying a margin in the direction it has been floated. And voila! The margin will be doubled in the rendered output. Not really something you'd look forward to while creating a pixel perfect layout.
Consider this code:
- #element{
- background: #95CFEF;
- width: 300px;
- height: 100px;
- float: left;
- margin: 30px 0 0 30px;
- border: solid 1px #36F;
- }
#element{ background: #95CFEF; width: 300px; height: 100px; float: left; margin: 30px 0 0 30px; border: solid 1px #36F; } On standards compliant browsers, this is how it looks:
But here is how IE 6 decides to render it:
The Fix
The fix for this specific bug is to apply display: inline to the floated element and everything works as it is supposed to. Our previous code now changes to:
- #element{
- background: #95CFEF;
- width: 300px;
- height: 100px;
- float: left;
- margin: 30px 0 0 30px;
- border: solid 1px #36F;
- display: inline;
- }
#element{ background: #95CFEF; width: 300px; height: 100px; float: left; margin: 30px 0 0 30px; border: solid 1px #36F; display: inline; } 4. Inability to Have Elements with Small Heights
As part of creating a layout, you may need to create elements with very small heights as custom borders for elements. Usually, you'll just have to add height: XXpx to the style's declarations and you should be done. Or so you thought. Check the page in IE and you'll probably do a double take.
As an example, look at the following code:
- #element{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 300px;
- height: 2px;
- margin: 30px 0;
- }
#element{ background: #95CFEF; border: solid 1px #36F; width: 300px; height: 2px; margin: 30px 0; } And the output is just as expected: A 2 px element with a 1 px border.
And in IE:
Fix #1
The cause of this bug is pretty simple: IE simply refuses to size an element smaller than the set font size. Simply setting the font size to 0 lets you have an element as small and short as you like.
- #element{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 300px;
- height: 2px;
- margin: 30px 0;
- font-size: 0;
- }
#element{ background: #95CFEF; border: solid 1px #36F; width: 300px; height: 2px; margin: 30px 0; font-size: 0; } Fix #2
The next best way to deal with this bug is to apply overflow: hidden to the element so it collapses to the intended height.
- #element{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 300px;
- height: 2px;
- margin: 30px 0;
- overflow: hidden
- }
#element{ background: #95CFEF; border: solid 1px #36F; width: 300px; height: 2px; margin: 30px 0; overflow: hidden } 5. Auto Overflow and Relatively Positioned Items
This bug rears its ugly head when in a layout you set the parent container's overflow property to auto and place a relatively positioned item inside it. The relatively positioned item violates its parent element's boundaries and overflows outside. Let me demonstrate. Look the following code:
- <div id="element"><div id="anotherelement">div>div>
- #element{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 300px;
- height: 150px;
- margin: 30px 0;
- overflow: auto;
- }
- #anotherelement{
- background: #555;
- width: 150px;
- height: 175px;
- position: relative;
- margin: 30px;
- }
#element{ background: #95CFEF; border: solid 1px #36F; width: 300px; height: 150px; margin: 30px 0; overflow: auto; } #anotherelement{ background: #555; width: 150px; height: 175px; position: relative; margin: 30px; } And the expected output:
And IE's output:
The Fix
The easiest way to fix this annoying bug is to just position the parent element relatively too.
- #element{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 300px;
- height: 150px;
- margin: 30px 0;
- overflow: auto;
- position: relative;
- }
#element{ background: #95CFEF; border: solid 1px #36F; width: 300px; height: 150px; margin: 30px 0; overflow: auto; position: relative; } 6. Fixing the Broken Box Model
Internet Explorer's misinterpretation of the box model is perhaps its unforgivable mistake. IE 6 in semi-standards compliant mode sidesteps this but this issue can still be triggered by quirks mode.
Two div elements. One with the fix applied and one without. The difference in the width and height is the sum of the paddings applied on each side.
The Fix
I am sure the quandary with the box model needs neither explanation nor demonstration so I'll just give you the fix.
The trick is to set the width normally for all standards compliant browsers, target IE5/6 alone and then feed it the corrected width. This is how you'd usually go on about:
- #element{
- width: 400px;
- height: 150px;
- padding: 50px;
- }
#element{ width: 400px; height: 150px; padding: 50px; } This now changes to:
- #element {
- width: 400px;
- height: 150px;
- \height: 250px;
- \width: 500px
- }
#element { width: 400px; height: 150px; \height: 250px; \width: 500px } Essentially, you add the padding to the original width and feed it to IE 6. The fix targets IE 6 in quirks mode alone so you need not worry about IE 6 in normal mode messing things up.
7. Setting a Minimum Width and Height
Setting an minimum height to an element is absolutely imperative when trying to convert a beautiful design into a pixel perfect design. Unfortunately, IE completely ignores the min-height property instead taking the height declared as the minimum height.
Fix #1
The fix is a hack created by Dustin Diaz. It utilizes the !important declaration to make it work. The snippet looks like so:
- #element {
- min-height:150px;
- height:auto !important;
- height:150px;
- }
#element { min-height:150px; height:auto !important; height:150px; } Fix #2
The second way is to take advantage of the fact that IE can't parse child selectors.
- #element {
- min-height: 150px;
- height: 150px;
- }
- html>body #element {
- height: auto;
- }
#element { min-height: 150px; height: 150px; } html>body #element { height: auto; } 8. Floated Layout Misbehaving
One of the important concepts of building table-less layouts using CSS is floating elements. In most cases, IE6 handles this with aplomb but in certain cases it fumbles. When faced with unbreakable content or elements whose width exceeds its parent's width, it causes havoc with the layouts. Let me show you.
Consider this piece of code:
- <div id="container">
- <div id="element">http://net.tutsplus.com/div>
- <div id="anotherelement">div>
- div>
http://net.tutsplus.com/
- #element, #anotherelement{
- background: #95CFEF;
- border: solid 1px #36F;
- width: 100px;
- height: 150px;
- margin: 30px;
- padding: 10px;
- float: left;
- }
- #container{
- background: #C2DFEF;
- border: solid 1px #36F;
- width: 365px;
- margin: 30px;
- padding: 5px;
- overflow: auto;
- }
#element, #anotherelement{ background: #95CFEF; border: solid 1px #36F; width: 100px; height: 150px; margin: 30px; padding: 10px; float: left; } #container{ background: #C2DFEF; border: solid 1px #36F; width: 365px; margin: 30px; padding: 5px; overflow: auto; } The expected output as viewed on a standards compliant browser:
In IE:
As you can see, the first div expands itself to fit the content which ultimately breaks the layout.
The Fix
There is no elegant fix for this bug. The only way to save the layout is to apply overflow: hidden to the element but at the cost of clipping the unbreakable content. The layout will be saved but the extra content won't.
- #element{
- background: #C2DFEF;
- border: solid 1px #36F;
- width: 365px;
- margin: 30px;
- padding: 5px;
- overflow: hidden;
- }
#element{ background: #C2DFEF; border: solid 1px #36F; width: 365px; margin: 30px; padding: 5px; overflow: hidden; } 9. Space Between List Items
IE 6 adds vertical spacing even none is specified in specific cases. Let's look at the code first.
- <ul>
- <li><a href="#">Link 1a>li>
- <li><a href="#">Link 2a>li>
- <li><a href="#">Link 3a>li>
- ul>
- ul {
- margin:0;
- padding:0;
- list-style:none;
- }
- li a {
- background: #95CFEF;
- display: block;
- }
ul { margin:0; padding:0; list-style:none; } li a { background: #95CFEF; display: block; } What it should look like:
What IE gives us:
Fortunately, there are a plethora of fixes you could try.
Fix #1
The easiest way out is to just define a width for the anchor tags and voila! everything renders as it should. Declaring a width triggers the element's IE specific hasLayout property. You could instead define a height if you want to.
- li a {
- background: #95CFEF;
- display: block;
- width: 200px;
- }
li a { background: #95CFEF; display: block; width: 200px; } Fix #2
The next method is to just float the anchor left and then clearing it.
- li a {
- background: #95CFEF;
- float: left;
- clear: left;
- }
li a { background: #95CFEF; float: left; clear: left; } Fix #3
The third method is to add display: inline to the enclosing li element. This also fixes the double margin bug as noted above.
- li {
- display: inline;
- }
li { display: inline; } Conclusion
And there you have it: the nine most common IE rendering bugs, and how to squash them. Hopefully this has saved you some blood, sweat and tears while debugging your next creation. I'll be watching the comments section frequently; so chime in here if you are having difficulties implementing the fixes noted here.
Monday, November 9, 2009
Installing PHP on IIS 6 (Windows 2003)
I spent lot of time on browsing over the internet and knowing how to install PHP on IIS, and found good solutions, but none were actually working for me. So I hope my solution will be a very brief one, and would help somebody save lot of time.
What I prefer, and did, was as below:
- Download Web Developer Suite
- Install Web Developer Suite
- Open the Web Developer Suite after installation, and click on Disable Startup for Apache. You should see the MySQL and IIS W3 as Running
- Then you should be able to run the php files on your IIS wwwroot folder. However, if any error such as "Service Unavailable" or Page not able to be displayed occurs, then check the Application Pool if it is running or stopped. Also make sure you add .php extension from Home Directory, and select the file "php5isapi.dll". Also go to "Web services" and add a new web service as "PHP" and select the file php5isapi.dll from your php directory, and save.
- You have PHP installed in few steps, Restart IIS, and you should have it working.
Tuesday, November 3, 2009
phplist - Opensource Newsletter Management Script
Newsletter Management
phplist Features
- phplist is a one-way email announcement delivery system. It is great for newsletters, publicity lists, notifications, and many other uses. (It is different from group mailing list systems like mailman.)
- The Web Interface lets you write and send messages, and manage phplist over the internet.
- phplist keeps sending messages from your web server, even after you shut down your computer.
- 100 000 + subscribers. phplist is designed to manage mailing lists with hundreds of thousands of subscribers. phplist is excellent with smaller lists too!
- No duplicate messages. No 'forgotten' messages. phplist manages message delivery with a message queue, ensuring that every subscriber gets the email message, and that no subscribers receive two copies, even if they're subscribed to more than one list!
- Open/View Tracking tells you how many users opened your email message. This provides a minimum statistic, as many email clients with privacy or security policies block images (gmail, thunderbird, and others).
- Click Tracking tracks links and URLs. Statistics can be viewed by message, URL or subscriber.
- Multiple Subscribe Pages allow you to choose many different combinations of templates, languages, user attributes and lists.
- Templates are completely customizable, and make site integration a breeze.
- Multiple Templates on different subscribe pages can integrate phplist with several different web sites.
- Subscriber Attributes like 'name', 'country', and other personal information, are completely customizable. You can specify what information you need to get from users when they subscribe.
- User Specific Content. You can use Subscriber Attributes in message content to make each and every email message personalized with the subscribers name, country, or any other attribute.
- HTML email messages. Subscribers can be given the choice between text or html email messages. You decide whether subscribers can choose, what the default choice is, and what format a message is sent in: text only, html only, or both!
- The HTML Editor allows you to edit html messages from phplist using FCKeditor. TinyMCE is also available.
- Internationalization. phplist is available in English, French, German, Spanish, Portuguese, Traditional Chinese, Dutch, Vietname and Japanese and translation work is in progress for other languages.
- Easy Install via Fantastico, FTP upload, or SSH.
- Multiple List Administrators. The super-admin can assign lists to List Managers, who can manage their users and lists. The super-admin user can 'prepare' messages that can be sent by list managers to their lists.
- Subscriber Preferences. Every email message contains personalized URLs for subscribers to update their preferences or unsubscribe. Subscribers can update their own information and keep your database up to date. Unlike most other mailing list managers, in phplist subscribers can change their email address.
- The User Management tools are excellent to manage and maintain large databases of subscribers.
- Bounce Processing keeps your database clean of unused and non-existent email addresses.
- Advanced Bounce handling let's you teach phplist to distinguish between permanent and temporary message-delivery errors. You can define automated actions on receipt of bounce messages according to matches with your regular expressions.
- CSV Import and Export. Use CSV and tab delimited files to import your existing list of users or to export the users on the phplist system for use in your in-house database. phplist's database has a 'foreign key' to help keep multiple copies of databases synchronized without duplicating users.
- Attachments can be uploaded and included in messages for download.
- Send a Web page. Tell phplist the URL of a web page you want to send to your users, and phplist will fetch it and send it. You can even put subscriber-specific parameters in the URL.
- RSS feeds can be automatically sent to a mailing list weekly, daily, or monthly.
- PDF messages can be automatically created and sent as attachments to ensure that your message is seen the way it was designed by all your subscribers, regardless of their email message reader.
- Batch Processing is useful in shared hosting environments. Set the maximum number of sent messages in a given time period.
- Throttling can limit the load on your server so it doesn't overload.
- Domain Throttling limits the number of emails to specific domains to keep on the friendly side of their system administrators.
- Scheduled Sending let's you tell phplist when the message is to be sent.
- Repetition. A message can be repeated automatically to send updated dynamic content and attachments.
- Text from HTML. Text email messages are managed fluently in phplist. phplist will automatically create a text version of an html message. Optionally the message composer can create it manually.
- PGP signing and encrypting (soon).
Send your message digitally signed or encrypted, or both. - Email to Fax (soon).
Configure the details of your favourite email 2 fax gateway and phplist will send the HTML version of the message as a PDF attachment to your fax gateway. The fax will include the images in the HTML. - Integration with other tools. Several systems exist on the internet that integrate phplist with your favourite CMS or blogging tool. Check out the Documentation for a list.
Download phplist
Version
phplist version 2.10.10 is the latest stable release. It was released on May 5th, 2009.
License
phplist is licensed under the GPL v2. Please make sure that you understand this license before downloading.Thursday, October 29, 2009
Convert any website layout or template into a Drupal theme - easily!
Theming for Drupal is not actually as hard as you may think. Certainly there are more advanced areas of theming possible with Drupal, which may or may not be necessary depending on the needs of your site or whether there are subtle defaults which you wish to change (and which you can learn about if and when they become necessary for your site). Creating the "overall theme" for your site though is very simple.
A Drupal theme is nothing more than a standard website layout, with a few bits of PHP code added in certain places, which you can simply copy/paste into place in order to call up Drupal's "dynamic" content and features in those spots.
If you learn better visually, a video is available which covers much of the same information that will be illustrated here: Static Theme Conversion.
Contributed/downloaded themes are more complex than "your" theme needs to be
You may have looked at various pre-made themes that either come with Drupal core or are available for download, and sighed with frustration upon seeing their code. To some, the code looks very confusing.
Flash with Drupal Modules and References
http://drupal.org/project/Services
http://drupal.org/project/amfphp
http://www.amfphp.org/
Wednesday, October 28, 2009
BuildExec - a website Package Installer for PHP
http://www.buildexec.com
Monday, October 26, 2009
Wednesday, October 21, 2009
Wednesday, October 14, 2009
Error Message Guidelines
http://www.experoinc.com/resources/papers/2005-06-ErrorMsgs.htm
Sunday, October 4, 2009
Document Generator Tools
DoxyGen
Source code documentation generator tool
Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.
(It's used by Drupal as well I guess, so this one should be definitely one of the Bests):
http://www.stack.nl/~dimitri/doxygen/
phpDocumentar
http://www.phpdoc.org/
Saturday, October 3, 2009
InputEX - javascript library to build fields and forms.
Introduction
inputEx is a javascript library to build fields and forms.
It can also be considered as an interface framework, since it provides a good structure to create you own fields.
It is built on top of the YUI library, and we try to keep it as close as possible to the YUI philosophy.
It is of course fully skinable using CSS and currently supports Firefox 1.5+, Safari 2.0+, IE 7.0+, Chrome 0.2+ and Opera 9+.
A unique field library
With so many form libraries out there, why would we create another one ?
- HTML fields/forms are very limited: no interaction, missing basic features, etc...
- no existing good input library for YUI (let me know if I'm wrong !)
- Implement multiple browsers hacks once and for all
- it's not all about validation !
Here are the features we implemented that makes inputEx unique :
- json configuration for each field
- complex data structures (list/objects/tree/list of urls/objects of objects etc...)
- composition between the fields (for "meta"-fields such as CombineField,InPlaceEdit,List,Tree,...)
- javascript object mapping for greater interactivity
- a common "updated" event to handle different browsers and different field interactions
No HTML ?
InputEx uses no html (it is the opposite of unobtrusive librairies): all the fields and forms are configured using json, then rendered by manipulating the DOM.
It is therefore a library to create javascript web applications, not webpages.
This approach has a great advantage: adding/modifying a field is made in one place only. Combined with the json configuration that can be stored server-side, it makes customization of your web application very easy.
Important Reference Sites
http://javascript.neyric.com/inputex/
http://javascript.neyric.com/inputex/doc/js_docs_out/index.html
http://javascript.neyric.com/blog/
Tuesday, September 29, 2009
System Analysis and Design Methods and Tools
Analysis Approach
• Rumbaugh and Booch Approach
• Unified Modeling Language (UML)
• Method-1 of AMEX
• ISO-2000 standards, and IEEE 1058a
Tools for Design Model
• Rational Rose 7.0
• ERWin (for ER-model)
• MS-Visio 2007
• MS-Word 2007
• MS-Excel 2007
Monday, September 28, 2009
Team Viewer - Easy way to do Remote Desktop Connection
TeamViewer - the All-In-One Solution for Remote Access and Support over the Internet
TeamViewer establishes connections to any PC or server all around the world within just a few seconds. You can remote control your partner's PC as if you were sitting right in front of it. Find out whymore than 15.000.000 users trust TeamViewer!
Fast - simple - safe.
Tuesday, September 15, 2009
Magic Admin Panel - excellent look and feel, free to use Admin Panel
Magin Admin Panel template can be downloaded from:
http://www.box.net/shared/q9rjrunzbs
Thursday, September 10, 2009
Coding and Documentation Standards
http://drupal.org/coding-standards
Code Documentation Standards:
http://drupal.org/node/1354
Doxygen - Useful Documentation Tool:
http://www.stack.nl/~dimitri/doxygen/features.html
SQL Coding Conventions
http://drupal.org/node/2497
Tuesday, August 25, 2009
ADOdb Database Abstraction Library for PHP (and Python)
ADOdb is a database abstraction library for PHP. There is also a Python version; see the ADOdb for Python docs.
The PHP version currently supports an amazing number of databases, thanks to the wonderful ADOdb community: MySQL, PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro, Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, and generic ODBC, ODBTP. The Sybase, Informix, FrontBase and PostgreSQL, Netezza, LDAP, ODBTP drivers are community contributions. Here is the complete list of drivers.
Many popular web applications such as ACID, Zikula/PostNuke, Xaraya, phpWiki, Mambo, PHP GACL, TikiWiki, eGroupWare and phpLens App Server are using ADOdb as their database abstraction layer. Some reasons why ADOdb is popular include:
- Designed for speed. It is probably the fastest open source database abstraction library available for PHP. See benchmarks.
- Provides extensive portability support such as date and type-handling and portable schema creation. See portable sql tips
- Support many enterprise features such as database backed sessions (with session expiry notification), SQL code generation, pivot tables, SELECT LIMIT emulation for all databases, performance monitoring.
- Easy to learn, especially if you have Window's programming experience, as it uses many ADO conventions.
- Extensive QA, every release is unit-tested on Access, MySQL, PostgreSQL, MS SQL, Oracle 9.
- Mature, continiously developed since August 2000. Has a large community of users.
- Powerful Active Record support. See docs.
- Very reasonable licensing terms (BSD). This means that you can incorporate (and even compile) it into your software applications royalty-free without asking the author's permission, provided you include license.txt in your release. Also dual-licensed (Lesser GPL).
Tuesday, July 28, 2009
What is a Bad Design for a Website?
Robin Williams
Below are features that can make a web design look dorky. These are not just my personal opinions, but are ideas I have collected from speaking to groups around the country. Examples of many of these features and more detailed explanations of the problems and solutions are in my book, The Non-Designer's Web Book, written with John Tollett.
- Backgrounds
- Default gray color
- Color combinations of text and background that make the text hard to read
- Busy, distracting backgrounds that make the text hard to read
- Text
- Text that is too small to read
- Text crowding against the left edge
- Text that stretches all the way across the page
- Centered type over flush left body copy
- Paragraphs of type in all caps
- Paragraphs of type in bold
- Paragraphs of type in italic
- Paragraphs of type in all caps, bold, and italic all at once
- Underlined text that is not a link
- Links
- Default blue links
- Blue link borders around graphics
- Links that are not clear about where they will take you
- Links in body copy that distract readers and lead them off to remote, useless pages
- Text links that are not underlined so you don't know they are links
..(If you're not going to underline your links, please make darned sure
..that each link is perfectly clearly a link! Don't make me wander around
..with my mouse checking to see if randomly colored text is a link!) - Dead links (links that don't work anymore)
- Graphics
- Large graphic files that take forever to load
- Meaningless or useless graphics
- Thumbnail images that are nearly as large as the full-sized images they link to
- Graphics with no alt labels
- Missing graphics, especially missing graphics with no alt labels
- Graphics that don't fit on the screen (assuming a screen of 800 x 600 pixels)
- Tables
- Borders turned on in tables
- Tables used as design elements, especially with extra large (dorky) borders
- Blinking and animations
- Anything that blinks, especially text
- Multiple things that blink
- Rainbow rules (lines)
- Rainbow rules that blink or animate
- "Under construction" signs, especially of little men working
- Animated "under construction" signs
- Animated pictures for email
- Animations that never stop
- Multiple animations that never stop
- Junk
- Counters on pages -- who cares
- Junky advertising
- Having to scroll sideways (800 x 600 pixels)
- Too many little pictures of meaningless awards on the first page
- Frame scroll bars in the middle of a page
- Multiple frame scroll bars in the middle of a page
- Navigation
- Unclear navigation; over complex navigation
- Complicated frames, too many frames, unnecessary scroll bars in frames
- Orphan pages (no links back to where they came from, no identification)
- Useless page titles that don't explain what the page is about
- General Design
- Entry page or home page that does not fit within standard browser window (800 x 600 pixels)
- Frames that make you scroll sideways
- No focal point on the page
- Too many focal points on the page
- Navigation buttons as the only visual interest, especially when they're large (and dorky)
- Cluttered, not enough alignment of elements
- Lack of contrast (in color, text, to create hierarchy of information, etc.)
- Pages that look okay in one browser but not in another
* * * * * * * * * *