Posts tagged Framework

Kohana Framework – 01.Instalação Básica


Kohana Framework – 01.Instalação Básica Download e instalação básica do framework kohana para PHP. Kohana é um framework mvc para PHP com foco em performance, muito interessante para iniciantes no uso deste tipo de ferramenta. www.poesiaoo.wordpress.com … kohana php framework mvc

Installing Dashboard Framework 2.1


This is a quick how-to video on the installation process of Dashboard Framework 2.1. … dashboard php framework application rad

Kumbia PHP Framework – Introducción


Vídeo donde se muestra una introducción de Kumbia PHP Framework y la creación de un proyecto con Eclipse IDE. Agradecimientos a Fidel Oyarzo por el vídeo.

.NET Framework

 .NET Framework what is the role and how come?

       Microsoft wants to come up with something standard so that everyone that everything can communicate to each other. Microsoft has invented a new system called .NET Framework is not an effective Operating System but the program will create an environment that can work in .NET If anyone has already used JAVA you may be familiar with the JAVA Virtual Machine .NET Framework it is considered as a Virtual Machine.

In the future, Microsoft hopes to bring.NET Framework is installed on all devices .NET Framework is divided into 3 large components Programming Languages, Base Classes Library, and Common Language Runtime.

Programming Languages

   Language used to create programs that work under the conditions of .NET. Microsoft introduced language that would develop on .NET there are 3 numbers of the language all together.
• C # is a new language by Microsoft developed from C++ and JAVA language.
• VB.NET (Visual Basic.NET or Visual Basic version 7.0) is a language derived from Visual Basic version 6.0.
• Jscript.NET language development from a Jscript which is Microsoft’s version JavaScript. These languages are an option that we have to use in the development of ASP.NET Web page with the following building-block.

Base Classes Library

     Library is a group of commands provided for the programming language. The majority of the commands are commonly used. Therefore the inventor of memory to facilitate the programming within the Library system.NET will be in the form of that eclipse Called Class Library.
      .NET has a mass amount of basic library and no matter what programming language you use to develop under .NET your entire Library series will be the same. Unlike before you can’t use the library from one language with the other language that means that each programming language has to have its own library. You can convert the source code from one language to another language one more easily.

Common Language Runtime (CLR)

     Is the most important element in .NET Framework because CLR has a function that allows programs written in different languages to be converted into a language with the same standard format we call that language Microsoft Intermediate Language (MSL as known as IL) there for when you use the program to run on a different system CLR will translates IL to become appropriate to the system (converted into the system language of the machine).

NET Framework what is it good for?

     Many will wonder why we write our program under .NET Framework and why it is better then programming the normal way.

1. The Library system has the same standard: Because the Library has the same standard. Allows us not to worry that the language of our writing is the correct Library or not, and you don’t have to worry that the Library that you use will not work in one’s language.
2. Not the operating system: Because each operating system using MRI are not identical. However if the programming is running under .NET all you need is to have .NET Framework in your program it will allow the program to work on every supported operating systems.
3. All the language are the same: we do not have to study of new language every time you want to program some thing new and you can use the programming language that your most familiar with to develop you program.
4. A controlled environment: Because the system is standard. Distributed control systems are easy to use whether its memory allocation the machine can do the job faster and lowering the possibility of you computer crashing.
5. Security is more: .NET Framework has a security option called permission. That allows the user to set whether to use that part of the program or not Depending on the user and you also have a function to encrypt your data.

 

 

 

Important Framework Components of Ruby on Rails

In yesterday’s post, I related how Ruby on Rails developers, the intense HyTech Professionals teams for instance, push the envelope for rich Web 2.0 applications by keeping their eye on five key RoR principles: trimmer code, segregation by sub-frameworks, not having to repeat one’s self, minimal configuration requirements, and instant feedback just by loading in a browser.

Next, we review the framework components that drive the Ruby on Rails objectives of simplicity, productivity, ready re-use, scalability, testability, and ease of maintenance:

In setting up the link between domain objects and the database, the Active Record sub-framework converts create, read, update and delete (CRUD) commands, the four basic functions of persistent storage, into SQL functions and transmits these to the database.  The key point is that Ruby on Rails activates a table when called in the database and automatically creates the required class.

Among others, Action Controller relies on actions developer-defined actions to receive requests, determines whether these are actions or objects requiring processing, and returns the proper view to the browser.

As the presenting sub-framework, Action View fills either RHTML or RXML templates with data in HTML format.

Finally, support for Web services – those based on SOAP and XML-RPC – is provided by what else but Action Web Services?  These do the job of publishing functionality better than the Representational State Transfer approach available with Active Controller.

Given these two admittedly-brief overviews of Ruby on Rails architecture and functionality, you probably understand better now why this platform has impressed folks on the cutting edge as a stable and sophisticated framework for agile Web engineering.  In my next post, we’ll go over some real-world applications.

Article .net Framework

The .NET framework (DotNet)is a new Microsoft initiative directed to the modification of computer world. More specifically, it is a large set of development tools, servers, software, and services. Its main advantages for the user are creation of an integrated information space connecting him or her with computers and programs, as well as connection software applications together. For developers, the value of dotNet lies in interoperability and the seamless connectivity of multiple systems and sources of data. This empowers them to quickly and easily create required products.
The IT department manager of every company has a dream — an enterprise that performs all business transactions with partners exceptionally over the Internet, with no headaches about the business processes. For this to happen, the processes must be well designed, stable, and easily customized and controlled both from the local network and from any computer in the Internet. All company’s employees should have general access to work information, Email and personal documents no matter if they use mobile phone, Pocket PC, Notebook or high-end workstation.

why .NET Framework so needed?

Better Performance
The .net developers make usage of advanced compilation and caching techniques to there by making server applications faster in .NET Framework. Developer Productivity
The .NET developers reap huge productivity gains by using .net class libraries helping in over all memory management. Powerful Security
The common security prototype effectively handles exposure to destructive software tools or utilities. Integration with Existing Systems
The .net programmers takes benefit provided by COM technology and programs against them as though they were originally written using the .NET Framework. The Native XML Web Services Support, available with Microsoft .NET , and the Java Language Conversion Assistant (JLCA) help to .net programmer convert the existing Visual Basic 6.0 and Microsoft Visual J++ code to run on the .NET Framework. Easy Deployment
The deployment and managing application in .NET Framework are easier for .net developer. With No-Touch Deployment, Windows-based smart client applications are deployed to and updated on target PCs simply by copying the necessary components to a Web server. The automatic version control of components helps .net programmer prevent versioning conflicts. Mobility Support
Single unified programming model in .net framework provides .net programmers in developing smart client and web applications for both PCs and mobile devices such as personal digital assistants (PDAs) and mobile phones. Support for More Than 20 Programming Languages
The support and integration of over 20 programming languages by .net framework enables .net developers to choose the right programming language. The various components written in different languages can interact seamlessly, with no COM plumbing required. Flexible Data Access
Web based data access is possible with interaction with .NET technology. The .net developers use ADO.NET which provides options like neutral platform, XML-based cache of the requested data, also instead of directly manipulating the database there by providing greater scalability.

Power, Reliability & Feature Richness – DotNetNuke an Open Source Framework

Taking care of the varying customer needs is the first priority of every businessman in the online business environment, in order to pay full attention to market variations; a business website needs to be flexible for the regular changes. In order to be attentive for the future changes website owner always look for custom application development, which can provide flexibility to adopt regular variations of internal and external business environment.

In the highly fluctuate and competitive online web development market, open source technologies like DotNetNuke framework are playing extremely supportive role with capability of providing satisfactory web application development solutions. Any modern online business owner can enjoy reliability factor in the field of web application development by using of DOTNET application development as (DNN) was initialized in year 2002 and its community is active for last six years for all kinds of technical and non technical support to users. From the developers point of view it is a unique web application framework, which is written in VB.NET programming language for the framework of ASP.NET. The applications developed by using this framework provide extend-able content management system, by using skins & modules. Plus its versatility can be seen with feature of being used for creation, deployment & management of intranet, extranet, and web sites.

Power and user friendliness

DNN is preferred in the DotNetNuke web development market for its user friendliness and power providing features. Inventors have designed this technology for the web developers, content editors, administrators and designers for the better management and control for the web assets. Power of supporting multiple websites from the single installation of application, Administrators can manage multiple websites and are able to maintain the unique appearance & content of each.

Easy installation and feature richness

Every user over the net wants simplicity in the things, by taking it seriously DNN provides easy installation process. Its a few minutes game of following simple installation instructions after downloading the software plus professional assistance from web development companies which provides integrated installation according to their hosting plans. Inbuilt features of DNN are simply great such as content management, site hosting, web designing and security. In addition, management and customization of membership options through browser based tools. Internet makes business globalize and users may be from various cultures and may use various languages around the world, by using DNN administrators are able to translate the projects & portals in various languages by taking advantage of multi-language localization feature.

DNN has really positioned itself as remarkable system for the cost effective web application development in the series of open source content management systems.

PHP4E Framework


A brief demonstration of the potential of PHP4E Framework … PHP Framework Extreme Programming Computer EZPDO JSON PaintFace FastTemplate

Microsoft.NET Framework

Microsoft.NET Framework

         The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet. The .NET Framework is designed to fulfill the following objectives:

To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. To provide a code-execution environment that minimizes software deployment and versioning conflicts. To provide a code-execution environment that guarantees safe execution of code, including code created by an unknown or semi-trusted third party. To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments. To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications. To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code.

          The .NET Framework has two main components: the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that ensure security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.

         The .NET Framework can be hosted by unmanaged components that load the common language runtime into their processes and initiate the execution of managed code, thereby creating a software environment that can exploit both managed and unmanaged features. The .NET Framework not only provides several runtime hosts, but also supports the development of third-party runtime hosts.

         For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for managed code. ASP.NET works directly with the runtime to enable Web Forms applications and XML Web services

Simple J2ee Model View Controller Type II Framework

Simple J2EE Model View Controller Type II Framework

Executive Summary

Application presents content to users in numerous pages containing various data. Also, the engineering team responsible for designing, implementing, and maintaining the application is composed of individuals with different skill sets.

One of the major concerns with the web applications is the separation between the logics that deal with Presentation itself, the data to be presented and the one that controls flow of logic. It is as an answer to such concerns that the Model-View-Controller or MVC pattern was designed.

This paper provides the solution to modularize the user interface functionality of a Web application so that individual parts can be easily modified, that is model view controller framework.

Introduction

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes.

Model: The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View: The view manages the display of information.

Controller: The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

It is important to note that both the view and the controller depend on the model. However, the model depends on neither the view nor the controller. This is one the key benefits of the separation. This separation allows the model to be built and tested independent of the visual presentation. The separation between view and controller is secondary in many rich-client applications, and, in fact, many user interface frameworks implement the roles as one object. In Web applications, on the other hand, the separation between view (the browser) and controller (the server-side components handling the HTTP request) is very well defined.

The solution provided in this paper is used very simple servlet and JSP and plain java objects, using this framework very easily any real time applications can be developed. By following this simple framework most of the complex MVC frameworks can be understood.

Model View Controller Types

MVC Type-I: In this type of implementation, the View and the Controller exist as one entity — the View-Controller. In terms of implementation, in the Page Centric approach the Controller logic is implemented within the View i.e. with J2EE, it is JSP. All the tasks of the Controller, such as extracting HTTP request parameters, call the business logic (implemented in JavaBeans, if not directly in the JSP), and handling of the HTTP session is embedded within JSP using scriptlets and JSP action tags.

MVC Type-II: The problem with Type-I is its lack of maintainability. With Controller logic embedded within the JSP using scriptlets, the code can get out of hand very easily. So to overcome the problems of maintainability and reusability, the Controller logic can be moved into a servlet and the JSP can be used for what it is meant to be — the View component. Hence, by embedding Controller logic within a servlet, the MVC Type-II Design Pattern can be implemented.

The major difference between MVC Type-I and Type-II is where the Controller logic is embedded in JSP in Type-I and in Type-II its moved to servlet.

MVC Type-II Framework

In this frame work, Model is a plain old java object, view is a JSP which will render the page using the model , these two are application dependent and this framework has a centralized controller is a servlet, which will populate the model and invokes a method from the action class.

Below is the source of the controller.

SimpleController.java

package simple;

import java.io.IOException;

import java.lang.reflect.Method;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

public class SimpleController extends HttpServlet {

private ActionBeanMapping mapping;

public void doGet(HttpServletRequest request,

HttpServletResponse response)

throws ServletException, IOException {

try {

String strJsp = null;

String strURI = request.getRequestURI();

int startIndex = strURI.lastIndexOf(“/”);

int endIndex=strURI.lastIndexOf(“.do”);

String strAction =

strURI.substring(startIndex+1, endIndex);

this.populateBean(request, strAction);

SimpleHandler handler =

(SimpleHandler)mapping.getActionInstance(strAction);

strJsp = handler.process(request, response);

request.getRequestDispatcher(strJsp).forward(request, response);

} catch (Exception e) {

e.printStackTrace();

request.getRequestDispatcher(“/error.jsp”).forward(request, response);

}

}

public void doPost(HttpServletRequest request,

HttpServletResponse response)

throws ServletException, IOException {

this.doGet(request, response);

}

public void init() throws ServletException {

String strFile = this.getServletContext().getRealPath(“/”)+

this.getServletConfig().getInitParameter(“actionmappings”);

System.out.println(“MAPPING FILE PATH::”+strFile);

try {

mapping = new ActionBeanMapping(strFile);

} catch (IOException e) {

e.printStackTrace();

}

}

private void populateBean(HttpServletRequest request, String strAction)

{

Object obj;

try {

obj = mapping.getBeanInstance(strAction);

Method methods[] = obj.getClass().getMethods();

for(int i=0; i0){

strValue = arrayValue[0];

}

try {

method.invoke(obj, strValue);

} catch (Exception e) {

e.printStackTrace();

}

}

}

request.setAttribute(SimpleHandler.BEAN, obj);

} catch (Exception e) {

e.printStackTrace();

}

}

}

The servlet’s init method is used to initialize the action and bean mappings.

public void init() throws ServletException {

String strFile = this.getServletContext().getRealPath(“/”)+

this.getServletConfig().getInitParameter(“actionmappings”);

System.out.println(“MAPPING FILE PATH::”+strFile);

try {

mapping = new ActionBeanMapping(strFile);

} catch (IOException e) {

e.printStackTrace();

}

}

Mapping file path is taken from the servlet config, and initialized the ActionBeanMapping helper class.

ActionBeanMapping.java:

package simple;

import java.io.FileInputStream;

import java.io.IOException;

import java.util.Properties;

public class ActionBeanMapping {

private Properties prop = new Properties();

public ActionBeanMapping(String propFile) throws IOException {

this.prop.load(new FileInputStream(propFile));

}

public Object getActionInstance(String action)throws Exception {

String strClass = prop.getProperty(“action.”+action.trim());

if(strClass == null)

throw new NullPointerException(“Null action::”+action);

return Class.forName(strClass).newInstance();

}

public Object getBeanInstance(String action)throws Exception {

String strClass = prop.getProperty(“bean.”+action);

if(strClass == null) throw

new NullPointerException(“Null bean::”+action);

return Class.forName(strClass).newInstance();

}

}

This class reads the properties file and provides two methods to instantiate the Action and Bean classes using java reflection for the specified user action.

The GET and POST methods of the request calls the following code in controller.

try {

String strJsp = null;

String strURI = request.getRequestURI();

int startIndex = strURI.lastIndexOf(“/”);

int endIndex=strURI.lastIndexOf(“.do”);

String strAction =

strURI.substring(startIndex+1, endIndex);

this.populateBean(request, strAction);

SimpleHandler handler =

(SimpleHandler)mapping.getActionInstance(strAction);

strJsp = handler.process(request, response);

request.getRequestDispatcher(strJsp).forward(request, response);

} catch (Exception e) {

e.printStackTrace();

request.getRequestDispatcher(“/error.jsp”).forward(request, response);

}

This piece of code gets the user action from the URI and instantiates the bean and action class and populates the model and invokes the method on an action class. All the actions classes in the application should implement the interface SimpleHandler. If any error occurs this controller forwards to a generalized error page.

SimpleHandler.java:

package simple;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

public interface SimpleHandler {

public static final String BEAN = “simple.BEAN”;

public String process(HttpServletRequest request, HttpServletResponse response) throws Exception;

}

All the action classes in the application should implement the process method.

Population of model data from the request object is done by the following controller method.

private void populateBean(HttpServletRequest request, String strAction)

{

Object obj;

try {

obj = mapping.getBeanInstance(strAction);

Method methods[] = obj.getClass().getMethods();

for(int i=0; i0){

strValue = arrayValue[0];

}

try {

method.invoke(obj, strValue);

} catch (Exception e) {

e.printStackTrace();

}

}

}

request.setAttribute(SimpleHandler.BEAN, obj);

} catch (Exception e) {

e.printStackTrace();

}

}

This method populates the model data and binds the model to request object, this model is accessed by the action class and JSP.

error.jsp

[%@ page language="java" pageEncoding="ISO-8859-1"%]

[html]

[head]

[title]Error page[/title]

[/head]

[body]

[font color="#ff0000"][b]Error occured while processing request.[/b][/font]

[/body]

[/html]

The web configuration is defined below, it’s a simple configuration file for controller.

web.xml:

[?xml version="1.0" encoding="UTF-8"?]

[web-app version="2.4"

xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"]

[servlet]

[description]Simple J2EE Controller[/description]

[display-name]Simple J2EE Controller[/display-name]

[servlet-name]SimpleController[/servlet-name]

[servlet-class]simple.SimpleController[/servlet-class]

[init-param]

[param-name]actionmappings[/param-name]

[param-value]WEB-INF/actionmappings.properties[/param-value]

[/init-param]

[load-on-startup]1[/load-on-startup]

[/servlet]

[servlet-mapping]

[servlet-name]SimpleController[/servlet-name]

[url-pattern]*.do[/url-pattern]

[/servlet-mapping]

[welcome-file-list]

[welcome-file]index.jsp[/welcome-file]

[/welcome-file-list]

[/web-app]

The controller servlet is invoked for all the urls which will ends with .do, this servlet loads on server startup, and defines the action mappings file path.

Sample Application using the Framework

Providing sample application to registration to store name, email and phone.

index.jsp:

[%@ page language="java" pageEncoding="ISO-8859-1"%]

[html]

[head]

[title]Home page[/title]

[/head]

[body]

[form method="post" action="register.do"]

[table width="200" border="0" align="center"]

[tr]

[td colspan=2 align="center"][strong]User Data[/strong]