View RSS Feed

All Blog Entries

  1. MVC Model

    by , 11-19-2011 at 05:18 PM (My Java Tips)
    The Model is the one which is responsible for managing data storage as well as retrieval of the data from the data source. When data changes it notifies all its Views about change in data. A model holds part of the current state of the application. The model represents enterprise data and the business rules that govern access to and updates of this data. The Model knows everything about the data that need to be displayed. However, it does not know anything about the View, that is the manner in ...
  2. MVC Controller

    by , 11-19-2011 at 05:07 PM (My Java Tips)
    In this post, I will briefly talk about MVC controller.


    Controller manages users interaction with the system. The component Controller is perhaps the most important component in the MVC architecture. It invokes the component Model and the component View and also couples these two that is View with the Model. If the application requires, it may invoke multiple Views and may couple them with the same Model. It listens to the user actions and according to business rules manipulates the ...
  3. MVC - View

    by , 11-19-2011 at 05:02 PM (My Java Tips)
    This post will briefly explain MVC view. I assume that you have some basic knowledge about MVC.


    There are many ways in which data can be accepted from the user and presented to the user in an application where data has to be accepted from the user, has to be updated/modified and has to presented back in a proper way to the user again.

    The component View consists of a presentation logic. It presents the data contained in the Model to the user. Further, it also allows ...
    Categories
    MVC
  4. MVC - View

    by , 11-19-2011 at 05:00 PM (My Java Tips)
    This post will briefly explain MVC view. I assume that you have some basic knowledge about MVC.


    There are many ways in which data can be accepted from the user and presented to the user in an application where data has to be accepted from the user, has to be updated/modified and has to presented back in a proper way to the user again.

    The component View consists of a presentation logic. It presents the data contained in the Model to the user. Further, it also allows ...
    Categories
    MVC
  5. Ant (an introduction)

    by , 11-19-2011 at 04:54 PM (My Java Tips)
    Ant is an open source software written in Java language. This is an Apache product. Ant is cross platform and portable. Ant is similar to make utility. It is used to automate software build processes to essentially build Java projects. However, at the same time it should be remembered that Ant is not a programming language. Ant uses XML to describe build processes. This XML file is called as build.xml.


    Ant can compile source code as well as Ant can package compiled source code and ...
  6. Simple Ant script

    by , 11-19-2011 at 04:49 PM (My Java Tips)
    Let us see how to write a simple ant script for a Java application. Write a simple HelloWorld Java class


    HelloWorld.Java
    Java Code:
    public class HelloWorld
    {
     	public static void main(String args[])
      	{
       		System.out.println("HelloWorld!");
      	}
    }
    By default Ant uses build.xml as the name for a buildfile. This is the build.xml.
    Java Code:
    <project default="compile">
    
      	<target name="compile">
    ...
    Categories
    Ant
  7. Ant Project

    by , 11-19-2011 at 04:43 PM (My Java Tips)
    In this post, I will present a sample build.xml file for a simple Java "Hello, world" application and will explain the ANT project.


    Java Code:
    <project name="HelloWorld" default="compile">
    
      	<target name="compile">
        		<javac srcdir=".">
      	</javac></target>
    
        	<target name="run" depends="jar">
        		<java classname="HelloWorld">
    ...
    Categories
    Ant
  8. ANT Targets and Tasks

    by , 11-19-2011 at 04:39 PM (My Java Tips)
    In this post, I will talk about ANT targets and tasks.


    <strong>Targets</strong>
    Each buildfile contains at least one target within the project. One target can be dependent upon the another target.
    Java Code:
    <target name="A">
    <target name="B" depends="A">
    <target name="C" depends="B">
    <target name="D" depends="C">
    <target name="E"
    ...
    Categories
    Ant
  9. ANT properties

    by , 11-18-2011 at 06:23 PM (My Java Tips)
    A project in a build.xml can have a set of properties. This property has a name and a value. In which the name of the property is case-sensitive. Properties can be used in the value of task attributes. It is done by putting the property name between "${" and "}" in the attribute value. For example, if there is a "builddir" property with the value "build", then this could be used in an attribute like this: ${builddir}/classes. At run-time this is resolved as ...

    Updated 11-18-2011 at 06:26 PM by Java Tip

    Categories
    Ant
  10. Struts 1 vs Struts 2

    by , 11-18-2011 at 06:20 PM (My Java Tips)
    In the following article, we are going to compare the various features between the two frameworks. Struts 2 is very simple as compared to struts 1, few of its important features are:


    1. Servlet Dependency

    Actions in Struts1 have dependencies on the servlet API since the HttpServletRequest and HttpServletResponse objects are passed to the execute method when an Action is invoked while in case of Struts 2, Actions are not container dependent because they are made of simple ...
    Categories
    Subversion
  11. Struts 1 vs Struts 2

    by , 11-18-2011 at 06:17 PM (My Java Tips)
    In the following article, we are going to compare the various features between the two frameworks. Struts 2 is very simple as compared to struts 1, few of its important features are:


    1. Servlet Dependency

    Actions in Struts1 have dependencies on the servlet API since the HttpServletRequest and HttpServletResponse objects are passed to the execute method when an Action is invoked while in case of Struts 2, Actions are not container dependent because they are made of simple ...
  12. Struts Controller

    by , 11-18-2011 at 06:13 PM (My Java Tips)
    Let us see how to configure the struts-config.xml file to map the request to some destination servlet or jsp file.


    The class org.apache.struts.action.ActionServlet is at the heart of the Struts Framework. It is the Controller part of the Struts Framework. ActionServlet is configured as Servlet in the web.xml file as shown in the following code.

    <!-- Standard Action Servlet Configuration (with debugging) -->
    Java Code:
    <servlet>
         <servlet-name>action</servlet-name>
    ...
  13. Using Struts2 Tags

    by , 11-18-2011 at 04:59 PM (My Java Tips)
    Struts provides HTML tag library for easy creation of user interfaces. In this lesson I will show you what all Struts HTML Tags are available to the JSP for the development of user interfaces.



    To use the Struts HTML Tags we have to include the following line in our JSP file:
    Java Code:
    &lt;%@ taglib uri="/tags/struts-html" prefix="html" %&gt;
    above code makes available the tag to the jsp.

    Java Code:
    <html:message key="thekey"/>
    ...
    Categories
    Struts
  14. Validating ASCII character set

    by , 11-17-2011 at 07:04 PM (My Java Tips)
    In this post, I will write about how to validate characters of ASCII characterset.

    ASCII is a well know character set. It is a 7 bit character set and represents 128 characters. The printable character codes range from 33 to 126 inclusive. Sometimes you want to make sure that your strings do not contains non ASCII printable character. This is easy and can be done by writing a method for this.

    Review the static method below. It takes an ArrayList of String type and after ...
  15. Creating a Simple Plug-in using PDE

    by , 11-17-2011 at 07:01 PM (My Java Tips)
    To get a better idea of how to develop plug-ins using PDE, you will create a simple workbench view. In this post, Ill give you some basic understanding.


    To get started, launch your Eclipse SDK and choose an empty workspace. When you close the Welcome page, you should find yourself in the Java perspective, by default (however, it is not required that you are in the Java perspective in order to proceed). First, you will use the New Plug-in wizard to create the plug-in. Then, you will ...
    Categories
    Eclipse
  16. Eclipse Plug-in Development Environment

    by , 11-17-2011 at 06:58 PM (My Java Tips)
    The Eclipse Plug-in Development Environment (PDE) provides a set of tools that assist the developer in every stage of plug-in development from genesis to deployment. The Plug-in Development Environment (PDE) is freely distributed as part of the Eclipse SDK, and serves as a good example of an Eclipse-based IDE tool.




    In PDE, each plug-in under development is represented by a single Java project. Plug-in projects have certain unique characteristics that make them what ...
    Categories
    Eclipse
  17. PDE - Preparing the workbench

    by , 11-17-2011 at 06:54 PM (My Java Tips)
    This post will help you in preparing the PDE workbench.




    From the default Resource perspective, open the PDE perspective via Window > Open Perspective > Other and choose Plug-in Development from the offered list.


    In addition to the main views and toolbar actions that are useful for Java development, the PDE perspective adds shortcuts to very frequently used wizards ...
    Categories
    Eclipse
  18. PDE Concepts

    by , 11-17-2011 at 06:50 PM (My Java Tips)
    In this post, I will introduce some PDE concepts to the audience.



    Host vs. runtime

    When you start up the workbench, you will use it to work on your projects that define the plug-ins you are building. The workbench instance that you are running as you develop your plug-in using the PDE and other tools is the host instance. The features available in this instance will come exclusively from the plug-ins that are installed with your application.

    Once ...
  19. Creating a plug-in project

    by , 11-17-2011 at 06:38 PM (My Java Tips)
    In this post, I will show you step by step how to create a plugin project.


    To create a plug-in project, bring up the New Plug-in Project creation wizard via File > New > Plug-in Project.


    It is a convention that plug-in project names are the same as plug-in IDs, but they can be different.

    The plug-in project can be created in one of two flavors: a Java project or ...

    Updated 11-17-2011 at 06:45 PM by Java Tip

    Categories
    Eclipse
  20. Plug-in manifest editor

    by , 11-17-2011 at 06:34 PM (My Java Tips)
    Lets talk about plugin manifest editor. When the plug-in project is created, the manifest file is open in the plug-in manifest editor.


    This multi-page editor is the central place to manage your plug-in and can be used to edit all the plug-in's file (manifest.mf , plugin.xml and build.properties).

    When you use the editor's forms, PDE transparently handles the task of writing the ...
  21. Plugin project - Overview page

    by , 11-17-2011 at 06:30 PM (My Java Tips)
    This post is about the overview page for plugin project.



    The Overview page is designed to be a quick reference on how to develop, test and deploy a plug-in. It is also a navigational center where you can follow the hyperlinks to navigate a particular page or execute a particular command.

    Plugin overview

    The Plug-in Content section explains the structure and content ...
  22. Plugin project - Dependencies page (II)

    by , 11-17-2011 at 06:26 PM (My Java Tips)
    In this post, I will talk about the Eclipse project's dependencies page.



    The Dependencies page shows the dependencies that your plug-in has on other plug-ins. You must list on this page all the plug-ins that contribute code required on your plug-in project's classpath to compile. When you modify the list of dependencies and save the file, PDE will automatically update your classpath.
    ...
  23. Plugin Runtime Page

    by , 11-17-2011 at 06:20 PM (My Java Tips)
    The Runtime page shows all the packages that your plug-in makes visible to other plug-ins.


    Press the Add button in the Exported Packages section to add the com.example.xyz and com.example.xyz.actions packages to the list.


    The Package Visibility section allows you to control on a per-package basis the visibility of your plug-in code to downstream plug-ins.

    The ...
    Categories
    Eclipse
  24. Eclipse project - Extension page

    by , 11-17-2011 at 06:16 PM (My Java Tips)
    Extensions are the central mechanism for contributing behavior to the platform. Unless your plug-in is a simple Java API library made available to other plug-ins, new behavior is contributed as an extension.


    The Extensions page is where you can add, remove and modify the extensions your plug-in contributes to the platform.


    Each extension point comes with an xml schema specifying ...
    Categories
    Eclipse
  25. Eclipse Plugin Project - Extension Points

    by , 11-17-2011 at 06:08 PM (My Java Tips)
    Extension points define new function points for the platform that other plug-ins can plug into.


    The Extension Points page is the place to add, remove and edit extension point declared by your plug-in.


    An extension point has three attributes:

    - id - a required attribute whose value is a simple name
    - name - a required attribute whose value is a translatable ...
  26. Plugin project - Build configuration page

    by , 11-17-2011 at 06:02 PM (My Java Tips)
    The Build Configuration page contains all the information needed to build, package and export the plug-in. It appears as a page in the plug-in manifest editor, but note that changes made to it will be written by PDE to the build.properties file of the plug-in. This file solely guides the build process.




    The Runtime Information section lists all the libraries that you want to build. For ...
  27. Eclipse Plugin Project - Source pages

    by , 11-17-2011 at 05:59 PM (My Java Tips)
    This post is about the source pages of Eclipse plugin project.


    Following are the points of interest:

    - The plug-in editor manages all three plug-in files at the same time.

    - The manifest.mf file is where all the plug-in data and dependencies is stored.

    Review the next part of this post.
    The plugin.xml file contains the extensions and extension points declared ...
  28. Running a plug-in

    by , 11-16-2011 at 07:38 PM (My Java Tips)
    As you develop your plug-in in the workspace, the incremental Java compiler will compile your Java source code and place the .class files into the bin directory of your PDE project. When you are ready to test your plug-in, you can launch a separate Eclipse application instance to test your new plug-in.


    The easiest way to launch an Eclipse application is via the link in the Testing section of the plug-in manifest editor's Overview page. This will immediately create a second Eclipse ...
  29. Java performance Issues

    by , 11-16-2011 at 07:17 PM (My Java Tips)
    In this post, I will talk about Java performance Issues briefly.


    General

    The output of a Java compiler is a bytecode and not an executable code. The Java Virtual Machine (JVM) interprets the Java bytecode at runtime. Most of the modern programming languages such as C, C++ are not interpreted and compiled to the executable code because of the performance concern. When a program is interpreted, it generally executes slowly when compared with an executable code.
    ...
  30. Using Spring with Hibernate

    by , 11-16-2011 at 05:43 PM
    In our previous tip, I gave an introduction to Spring’s persistence technology agnostic approach to data access. In this tip, we will show you how to use Spring with one of the most popular persistence technologies, Hibernate. Hibernate is an open source persistence framework that is one of the most successful persistence frameworks in the developer community. The reason for this is that it is a full featured object relational mapping (ORM) tool. It provides all the features you’d expect from a ...
    Categories
    Hibernate
Page 35 of 48 FirstFirst ... 25333435363745 ... LastLast