Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
Tuesday, May 27, 2008
Wicket vs GWT
Wicket and GWT both use component approach. But it's too different. The Wicket uses a special HTML attribute to denote components, enabling easy editing with ordinary HTML editors. With Wicket you get the benefits of a first-class component model and a non-intrusive approach to HTML. In Wicket, all server side state is automatically managed. For many applications, it will be worth trading off the increased server load of extra server-side state for decreased development costs, lower maintenance costs, quicker time-to-market and generally higher quality software.
But the GWT has a different approach to AJAX. The GWT use pour HTML and Java DOM model, to translates your Java application to browser-compliant JavaScript and HTML. Making a heavy use of client browser and minimizing number and size of HTTP requests. With Java to JavaScript translation you should always control your code. In client code you can use only base types. To call service you should create special classes. With service implementation you get 3 files. Two interface where first is for synchrony use, second is for asynchrony use and one implementation. So you have messy code. One of disadvantages is complex structure of modules.
Personally I chose Wicket. It impresses me with its simplicity and ability to create reusable panels without any XMLs.
Thursday, November 1, 2007
Why are most large-scale websites not written in Java?
Does anybody know large scale system written on PHP?
Debate: Why are most large-scale websites not written in Java?
What nine of the world’s largest websites are running on
Thursday, July 12, 2007
Basic Installer this IzPack
IzPack is a very easy for you to contribute, is a tool that will help you to solve you software installation problems. First of all, you need to download the IzPack http://www.izpack.org
IzPack uses XML files to describe installations. So there are no UI interface and your must write the XML installation file ”by hand” and compiling it with the command line compiler or invoking the compiler as the Ant task.
A specially I use Ant script to build my application. You need write only one time Ant script and call it.
build.xml
<project name="My Application Installer" default="installer" basedir=".">
<property name="dist.dir" value="."/>
<!-- Allows us to use the IzPack Ant task ( i use stand alone compilation )-->
<taskdef name="izpack" classpath="../izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
<target name="installer">
<echo message="Makes the Installer using IzPack"/>
<izpack input="${dist.dir}/installer.xml" output="${dist.dir}/installer.jar" installertype="standard" basedir="${dist.dir}" izpackdir="${dist.dir}/">
</target>
</project>
Now is the time to think about writing XML. As written in Ant script our XML is called as installer.xml. All IzPack XML start with a tag <installation> where is the following tags:
installer.xml
<!-- Application installation file. To compile it : - go in call with ant build.xml file. -->
<installation version="1.0">
<!-- The info section. -->
<info>
<appname>My application</appname>
<appversion>1.0</appversion>
<authors>
<author name="developer" email="info@developer.com">
</authors>
<url>http://www.home.page</url>
<javaverison>1.6</javaverison>
</info>
<guiprefs width="800" height="600" resizable="no">
<laf name="looks">
<os family="windows"/>
</laf>
</guiprefs>
<locale>
<langpack iso3="eng"/>
</locale>
<resources>
<res id="LicencePanel.licence" src="Licence.txt"/>
<res id="InfoPanel.info" src="Readme.txt"/>
</resources>
<panels>
<panel classname="HelloPanel"/>
<panel classname="InfoPanel"/>
<panel classname="LicencePanel"/>
<panel classname="TargetPanel"/>
<panel classname="InstallPanel"/>
<panel classname="FinishPanel"/>
</panels>
<packs>
<pack name="Core" required="yes">
<description>Core package</description>
<fileset dir="../dist/Application/" targetdir="$INSTALL_PATH">
<include name="**/*"/>
</fileset>
</pack>
</packs>
</installation>
Installation have wizard with a six panels. First show the application info, second show detail info
which is taken from Readme.txt, third is showing license from License.txt, fourth suggest select application directory, fifth install application, and at finish installation succeed.
Now you can show you application to the world. Remember 28% of application have crash on installation process.
IzPack uses XML files to describe installations. So there are no UI interface and your must write the XML installation file ”by hand” and compiling it with the command line compiler or invoking the compiler as the Ant task.
A specially I use Ant script to build my application. You need write only one time Ant script and call it.
build.xml
<project name="My Application Installer" default="installer" basedir=".">
<property name="dist.dir" value="."/>
<!-- Allows us to use the IzPack Ant task ( i use stand alone compilation )-->
<taskdef name="izpack" classpath="../izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
<target name="installer">
<echo message="Makes the Installer using IzPack"/>
<izpack input="${dist.dir}/installer.xml" output="${dist.dir}/installer.jar" installertype="standard" basedir="${dist.dir}" izpackdir="${dist.dir}/">
</target>
</project>
Now is the time to think about writing XML. As written in Ant script our XML is called as installer.xml. All IzPack XML start with a tag <installation> where is the following tags:
- info - information about application;
- variables - to specify variables of installation;
- guiprefs - GUI preferences (here you can set layout style, installation windows size ...);
- locale - to specify the language packs that you want to use for your installer;
- resources - most panels have resources, here you can specify you resources for panels;
- panels - IzPake have predefined panels that help as create installation easy and fast;
- packs - here you can specify package, most common you have one or two packages;
installer.xml
<!-- Application installation file. To compile it : - go in call with ant build.xml file. -->
<installation version="1.0">
<!-- The info section. -->
<info>
<appname>My application</appname>
<appversion>1.0</appversion>
<authors>
<author name="developer" email="info@developer.com">
</authors>
<url>http://www.home.page</url>
<javaverison>1.6</javaverison>
</info>
<guiprefs width="800" height="600" resizable="no">
<laf name="looks">
<os family="windows"/>
</laf>
</guiprefs>
<locale>
<langpack iso3="eng"/>
</locale>
<resources>
<res id="LicencePanel.licence" src="Licence.txt"/>
<res id="InfoPanel.info" src="Readme.txt"/>
</resources>
<panels>
<panel classname="HelloPanel"/>
<panel classname="InfoPanel"/>
<panel classname="LicencePanel"/>
<panel classname="TargetPanel"/>
<panel classname="InstallPanel"/>
<panel classname="FinishPanel"/>
</panels>
<packs>
<pack name="Core" required="yes">
<description>Core package</description>
<fileset dir="../dist/Application/" targetdir="$INSTALL_PATH">
<include name="**/*"/>
</fileset>
</pack>
</packs>
</installation>
Installation have wizard with a six panels. First show the application info, second show detail info
which is taken from Readme.txt, third is showing license from License.txt, fourth suggest select application directory, fifth install application, and at finish installation succeed.
Now you can show you application to the world. Remember 28% of application have crash on installation process.
Wednesday, July 11, 2007
Java Web Start application uninstall
Today I start implement in my Java Web Start application the installer-desc element to identify and installer/uninstaller for an application. Which must be declared in main JNLP file as extension and in installation JNLP have . For installation and uninstalling, the JNLP Client must invoke the public static void main(String[]) method in the specified class with the String array {"install" | "uninstall"} as an argument. The end user should has suitable a Java version 7(b13), 6u2(b01) to call the uninstaller.
Subscribe to:
Posts (Atom)