PureMVC

October 28, 2008 1 comment

PureMVC is a framework which helps the Flex programmers to create applications in the MVC architecture. It helps the programmers to develop loosely coupled components. It helps to create the resusable codes. Very easy to understand and maintain than other frameworks. Forces the singleton pattern.

We can divide the pureMVC as:

  • Facade & Core
  • Controller & Commands
  • Model & Proxies
  • View & Mediators
  • Observers & Notifications

Steps to follow in PureMVC

1. Main application should call the facade.startup(this). Here facade is the singletone instance of ApplicationFacade class.

2. ApplicationFacade

  • Singleton class.
  • It extedns the org.puremvc.as3.patterns.facade.Facade.
  • It implements org.puremvc.as3.interfaces.IFacade .
  • Should override the initializeController() method.
  • It defines static constants for Notification names.
  • Initializes the Commands used to access and notify the Commands, Mediators and Proxies.

3. MacroCommand(s)

  • It extends the org.puremvc.as3.patterns.command.MacroCommand.
  • It implements the org.puremvc.as3.interfaces.ICommand.
  • Should override the initializeMacroCommand() method.
  • Executes the SimpleCommands and MacroCommands.
  • User can registerand retrieve the Mediators and Proxies.

4. SimpleCommand(s)

  • It extends the org.puremvc.as3.patterns.command.SimpleCommand.
  • It implements org.puremvc.as3.interfaces.ICommand.
  • Should override the execute( note:INotification ) method.
  • User can register and

See, Yes! Yes! – READY

October 28, 2008 4 comments

In today’s web arena, CSS has proved its importance in rigid way. Web content is no more targeted to web browsers only, Web content is been served for a verity of media now days. To efficiently handle such situation CSS plays a very crucial role.

In order to extract maximum pulp from CSS fruit there are few things needs to keep in mind. Although rule of thumb is efficiency is directly proportional to experience but I’ll point out few options 3-part post series See, Yes! Yes! – READYSee, Yes! Yes! – STEADY and See, Yes! Yes! – GO. which can help novice CSS developers to take right diversions.

All of following points are optional and one can modify them according to needs and/or simply drop the idea.

Big Picture:

Planning is a must for mid or big projects…for small projects one can instantly start coding.

While coding for new design, web designer must analyze the design mock-up and slice the design by keeping in mind the facts which are resultant of observation and guideline of website/blog/web application.

e.g.

  • What portion of design mock can be translated by using CSS rules instead

RIA and Flex

October 27, 2008 No comments yet

RIA

  • A rich Internet application (RIA) is a Web application designed to deliver the same features and functions normally associated with deskop applications.
  • RIAs typically form a stateful client application with a separate services layer on the backend.
  • Run in a web browser, or do not require software installation
  • Run locally in a secure environment called a sandbox
  • Installation footprint is smaller — overhead for updating and distributing the application is trivial, or significantly reduced compared to a desktop or OS native application
  • Updates/upgrades to new versions can be automatic or transparent to the end user
  • Users can use the application from any computer with an internet connection
  • Many tools exist to allow off-line use of applications, such as Adobe AIR, Google Gears, Curl, and other technologies
  • Most RIA techologies allow the user experience to be consistent, regardless of what operating system the client uses.
  • Web-based applications are generally less prone to viral infection than running an actual executable

Flex

Flex Builder IDE

A Tableless Table – Exploring the power of CSS3

October 27, 2008 3 comments

The recent browser versions like Firefox 3, Google Chrome, Internet Explorer 8, Opera 9.5 and Safari 3 are now coming with a great and brand new support: CSS3. Some of the new properties are introduced and here I am going to describe the table value for the display property.

To align data in a tabular structure we can use a common table using the HTML tags <table>, <tr>, <td> nonetheless we all know that by using that we are violating the latest web standards, right?But hold on for a second. I’m just going to introduce you a hot new way to code it using nothing else than div tags with the great CSS3 and the data will appear just like a table. Believe, that’s true!

Here is an example:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Some Page</title>
<style type="text/css">
.table {
display: table;
width:100%;
}
.row {
display: table-row;
width:100%;
}
.cell {
display: table-cell;
border: 1px solid blue;
padding: 1em;
width: 33%;
}
.element1 {
background:#0099FF;

How to hold a more effective code review

October 27, 2008 No comments yet

I found a very interesting article about Code Review that I’d like to share.

The article was written by Andrew Stellman and you can read it at Head First Labs in the address http://www.oreillynet.com/headfirst/blog/2008/09/how_to_hold_a_more_effective_c.html.

Enjoy!

Apache SSL – For Secure online transactions

October 24, 2008 No comments yet

Hey you are planning to start a e-commerce website, then you must know about SSL without which no one will trust your website as a safe place to use their cards…

What is SSL?

SSL (Secure Socket Layer) is a protocol used for secure data transfer. This is done by using private keys and certificates. A private key is used to encrypt the data which you are sending and the server can only decrypt this data with the private key available with it, A certificate is used to authentic yourself before proceeding.

So we need two things to make our website secure for online transactions. In this article i will explain how to generate a private key with open-ssl and apache, how to generate a certificate request from CA (Certificate Authority). How to configure your server to respond for ssl requests.

We use Apache 2, Debian Linux, Openssl for this article.

First step is to install Apache:

Go to console mode

aptitude install apache2

next install openssl to generate keys and certificates or certificate requests

aptitude install openssl

next generate certificate request and key using openssl

openssl req -new -nodes

Web Hosting in Detail (Choose best hosting for your Domain)

October 24, 2008 No comments yet

If you are planning to build a small personal website or big communtiy website you need a hosting account. But these two sites wont fit with a single hosting type.

Generally if you search for a hosting provider you will find different plans starting from $1 per month to $100 per month or even more, single service with different prices.Then

Which Hosting service should i buy?

A big question for a person who is going to start a new website and the answer is also not so simple it involves lots of technical things in it to choose the best one.

But i dont want to confuse you with many technical things i will give a brief introduction to different factors which effect the price of the hosting.

There are different types of web hosting services available in market

Shared hosting: This is most common hosting used by number of websites. In this type you will get a share a single server hardware resources with others clients. In this type the software maintaince and upgradation is maintained by the hosting provider only. You don’t have the control over the server but you have full control over your website using…

Yes, I'm an OOP developer! But Design Patterns?!?

October 22, 2008 2 comments

“Well, I went pretty fine on my Object-Oriented experience. I’ve learned something about polymorphism, inheritance, encapsulation and now I really know how to extend a class! I’m ready for developing cool object-oriented applications.”

But what about the design? No, no… I don’t mean that design where you place the squares and circles in their places, draw lines, beautiful backgrounds and all those kind of stuff. I’m talking about Software Design. Design in terms of objects. Which objects to use, how and when to use, how the hierarchy would look like, which object should extend which object, when to encapsulate, when not.

It’s very common for developers to misunderstand Object-Oriented Programming with its basis concept (abstraction, inheritance, encapsulation, polymorphism, interfaces). Only because you know how to extend a class doesn’t mean that you really understand Object-Oriented Programming. It’s quite more than this.

First, let’s start with Design Patterns. Design Patterns are proven reusable solutions to solve a software design problem that other developers already faced before you. It’s not a kind of pre-cooked cake, where you just need to put in your heater for some time to get it done, but a description or template for how to solve a problem…