Hot New WebDevelopmentBits

File upload in ruby on rails

Most important part is to create the model and controllers using
ruby script/generate model model name
ruby script/generate controller controller name

Here is the bits of code
1. controller/upload_controller.erb

class UploadController < ApplicationController
def index
render :file => ‘app\views\upload\uploadfile.rhtml’
end
def uploadFile
file_param = params[:upload][:datafile]
#####using model
post = DataFile.save(file_param)
#####end using model

## directly from controller
#filename = file_param.original_filename
#filedata = file_param.read
#name = filename
#directory=”public/data”
#path=File.join(directory,name)
#File.open(path,’wb’) do |file| file.write(filedata)
##### end directly from [...]

See, Yes! Yes! - GO

Modular CSS needs to be developed and all inherited properties needs to commented within CSS declaration so one don’t repeat same CSS again and selectors needs to named by some naming convention (e.g. prefixing every declaration by module).

Modules needs to be devised in such way so it remain plug and play if plugged in different application.

Alert!!! Phishing Net Ahead!

Phishing is a scam where Internet fraudsters send spam or pop-up messages to lure personal, financial and Intellectual information from unsuspecting victims.

Personal Phishing ask for the Personal info ie. Address, email Id, Contact No.

Financial Phishing asks for Bank Details, Credit Card details and …

Playing with MouseEvent in Flex 3

I have come across a very interesting problem while developing a flex application where I have a
button control and I want to call two different functions on  click of the button . The interesting part
is that I want to call two different functions on different events of the same button control, one at
single click and [...]

See, Yes! Yes! - STEADY

Not every validated webpage is accessible or ideal but every invalid web page is bad. So always try to validate. First by validating from validators and then by common sense, because technically a page with thousands of nested DIVs are valid. button stimulated out of div is valid. But question is… Is it really?

SingleTon Pattern in Flex

What is singleton pattern?

The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. If you create the class as a singleton then no way to create more than one instance. But, you can get that single instance in any number of classes. So all the classes [...]

Modular Applications

Modular applications

Sometimes our flex application’s size becomes very large. Due to this, we are facing many problems such as bandwidth, network traffic and it will take more time to load. We have many ways to solve this problem such as

1. Do not embed the assets into the project.
2. Modules.

About Modules

Modules are the swf [...]

Philosophy of Object Oriented Programming and Software Design

Now, I am no expert in OOP or software design, but here’s a philosophy which might help you make the most of what you know about OOP and software design.

PureMVC

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 & [...]

See, Yes! Yes! - READY

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 [...]

Next Page »