Showing posts with label Java/J2EE. Show all posts
Showing posts with label Java/J2EE. Show all posts

Tuesday, August 28, 2007

60+ template engines for JAVA, PHP and .NET

Template engines are designed to allow the separation of business logic from the presentation layer, which means allowing MVC architecture to the developers. With the aid of template engines, we are able to develop websites with different looks but the same logic or the core code. Template engines are lately known as not good ideas because recent platforms already have embedded template engines to separate views from logic, generate code etc... As you see there are very few template engines in .NET and Java comparing to the PHP. But they are still pretty useful tools for developers.

Java
  • The Apache Velocity Engine - a free open-source templating engine. Velocity permits you to use a simple yet powerful template language to reference objects defined in Java code. It is written in 100% pure Java and can be easily embedded into your own applications
  • StringTemplate - a java template engine (with ports for C# and Python) for generating source code, web pages, emails, or any other formatted text output. StringTemplate is particularly good at multi-targeted code generators, multiple site skins, and internationalization/localization.
  • FreeMarker is a "template engine"; a generic tool to generate text output (anything from HTML to autogenerated source code) based on templates. It's a Java package, a class library for Java programmers. It's not an application for end-users in itself, but something that programmers can embed into their products. Integrates with servlets, XML, Python and more
  • JBYTE - JavaBY Template Engine is a general template engine used for generating any type of text document from a template. JavaBY Template Engine is used mostly for generating HTML from servlets but it can also be used for generating XML, RTF, WML, e-mail text, source code and configuration files.
  • Jamon - a text template engine for Java, useful for generating dynamic HTML, XML, or any text-based content. Jamon clearly is aimed at the View (or presentation) layer. It has a rich feature set to support encapsulation, parameterization, functional decomposition, and reuse of presentation logic.
  • Tea is a simple yet powerful template language. Tea is most commonly used for creating dynamic web pages in the TeaServlet. Tea is a strongly typed, compiled programming language, designed to work within a Java-based hosting environment. Tea is designed to enforce a separation between data acquistion and presentation, without sacrificing basic programming constructs.
  • JDynamiTe is a simple yet powerful tool used to create dynamic documents from "template" documents. It is based on the same concept as those of "FastTemplate", which is a very popular PHP extension used in many Web sites to create dynamic HTML pages. Note: JDynamiTe is not a Java port of FastTemplate.
  • BTE (Better Templates for Everyone) - A template system designed to make the creation of web sites easier.
  • Jxp (Java scripted page) is a script-processor that process JSP-like files. It contains a parser to parse the script file into an abstract syntax tree and a tree processor (JxpProcessor) that will process the syntax tree to execute the code using reflection API to produce output.
  • SiteMesh - a web-page layout and decoration framework and web- application integration framework to aid in creating large sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required.
  • LSP is an advanced web template language based on XML technology. LSP provides powerful and easy to use presentation logic, but keeps business logic and technical details out of templates. LSP is compiled into Java bytecode for efficient execution.
  • Dynamator - a simple but powerful tool that transforms standard HTML and XML files into server pages or programs. Dynamator works with any page generation technology, including JSP, XSL, PHP, ASP, Velocity, Cold Fusion, and Java. Dynamator is compatible with any application architecture, and has no performance impact.
  • Jtpl - a template engine for Java Servlet which allows you to store your HTML code apart from your Java code.
  • Bluprints - a JSP templating framework that provides a simple and powerful alternative to Tiles and other frameworks. JDK 1.5 is required to run Bluprints.
  • WebMacro - more effective for rendering web pages than JavaServerPages, PHP, and ASP. We say this because, since 1999, programmers around the world have used both and universally endorsed WebMacro.
  • Canvas - a template generator based on the Groovy language. It uses the familiar Velocity Java API to bind variables and allows you to use the full expressivity of Groovy inside your templates.
  • IKAT - the purpose of IKAT is to establish a complete separation between presentation and business logic.
.NET
  • Asp.NET HTML Template Engine - create HTML templates for your ASP.NET application. Multiple template regions can be defined; you are no longer restricted by the usual header / footer templates.
  • NVelocity - a .Net-based template engine. It permits anyone to use the simple yet powerful template language to reference objects defined in .Net code.
  • Netro - a .Net-based template engine. It allows the use of simple yet powerful template language to reference objects defined in .Net code.
  • Evolve MasterPages - a powerful template engine which allows you to merge the contents of your ASP.NET web forms with a Master Page (template). It's very easy to use and provides full designer support. It's extremely easy to use and provides full designer support. The engine provides a new approach regarding the separation of ASP.net templates and webforms and makes it extremely easy to get your templates working. It prevents you from scattering additional HTML all over your web application and enforces a clean separation of design and development.
  • StringTemplate.NET - an idiomatic C# implementation of the Java StringTemplate Library. It runs on C#/CLI platforms such as Microsoft .NET, Novell Mono and dotGNU. StringTemplate.NET is a template engine for generating formatted text output. Examples of such output includes source code, web pages and emails. It differs from most other template engines by [more] strictly enforcing Model-View separation.
PHP
  • Smarty - a template engine that compiles the templates into PHP scripts, then executes those scripts. Very fast, very flexible.
  • web.template - new template system, works only with PHP5, uses XML-like look language, and you can call for templates method in your classes.
  • XTemplate - a cool templating engine for PHP, allows you to store your HTML code separately from your PHP code (as opposed to compiling your template into PHP as per Smarty etc.). It has many useful features such as nested blocks and various kinds of variable interpolation, and yet the code is very short and very optimized.
  • Open Power Template - a template engine written in PHP, and probably the one, which natively supports PHP 5. While developing it we chose two main goals for it: to be fast, and to be flexible. OPT uses a very effective template parsing algorithm, which compiles the templates into the PHP code.
  • FryPHP - very young, fast and easy to learn templating engine/system for PHP5, written in object oriented manner using test driven development (TDD), allows local variables for each template, you also can set global variables.
  • Template Class - very easy to use yet powerful and quick template engine. It can handle simple variable replacement and table building using two dimensional arrays and/or MySQL result sets. Performance is excellent. Has support for multiple template files. Documentation is included in the zip file.
  • Template Lite - written under PHP 5 and is currently being written under PHP 5.2.1 with E_STRICT enabled. Template Lite works without error under all versions of PHP 5 from 5.1.3 and higher. Before PHP 5.1.3 VAR would give a warning notice under E_STRICT. Template Lite works under PHP 5 without any errors but does not use any PHP 5 specific attributes.
  • PHPTAL - a XML/XHTML template library for PHP. Some PHPTAL advantages and features; enforce the separation between logic and presentation, no more htmlentities, quite clean and readable templates, ability to insert sample text inside template to preview template result without PHP backend, integrates quite well with WYSIWYG HTML editors, data abstraction using xpath like system, cool html macro system, integrated internationalization system, ability to replace xpath system with php expressions, nearly no speed loss, and template source filter interface
  • Savant - a powerful but lightweight object-oriented template system for PHP. Unlike other template systems, Savant by default does not compile your templates into PHP; instead, it uses PHP itself as its template language so you don't need to learn a new markup system.
  • YATS - seeks to preserve FastTemplate features while improving on usability and speed. It is not a direct port of FastTemplate, as it adds/removes some features, changes the syntax, and simplifies a few things, such as template definition.
  • Simple Turtle PHP Template - a simple, small, fast and quick to use function that helps separate between the logic and presentation layers in PHP programs. It is simple because all it does is string replacements, for both single words and in blocks.
  • Templeet is an open-source project initiated by Pascal Courtois and Fabien Penso. It allows you to create photo galeries, news systems, personal sites, blogs, etc. Using Templeet, you can generate HTML, CSS, SVG pictures, SMIL, and any kind of text files.
  • Enzyme - simply put, is an engine for storing structured data for structured searching.
  • Bleetz - a revolutionary templates parser based on XML generating PHP. It translates Bleetz control tags into universal php code. It is designed to be fully integrated with Macromedia Dreamweaver.
  • SSTP (Server-Side Template Parser) - powerful tool for formatting pages based on templates. It will work with virtually any HTML/XHTML page, and has support for advanced features such as syndication of content and intelligent link correction.
  • VOOT (Vanilla Object Oriented Templates) - a simple ('vanilla') PHP class for creating web pages with templates. It supports user-defined HTTP headers, and it is capable of processing PHP contained in rendered templates.
  • ecTemplate - quit making dirty HTML pages. Separate your PHP code from your HTML. Finally that graphic designer will talk to you again ;)
  • phemplate - simple and fast templating engine for php. it provides a way of substituting variables into text templates and do some dynamic block functionality including loops.
  • Yapter is a PHP template engine. Other template engines all lacked some kind of functionality for me to just like them 100%.
  • ETS - easy template system - a template system written with PHP that enables you to transform a set of data to any type of document.
  • PatTemplate is a template system that gives us the power and flexibility to add templates to our PHP driven sites.
  • Qtpl - intended for use in CGI scripts. The library will be released in 6 versions: Plain Perl, Plain PHP, C version, PHP/C module, Perl/XS version, C++ version. All of them will support uniform syntax.
  • SledgeHammer - a template engine for PHP. It provides separation of business-logic and presentation in web-based applications.
  • PHPService is a powerful template engine based on an easy-extensible XML-Metalanguage.
  • Virtual Template - class for PHP4 & PHP5 (french)
  • SimpleT - An HTML Compiler
  • AvanTemplate - is a template engine for PHP. It is multi-byte safe and consumes little computing resource. It supports variable replacement, block that can be set to hidden or shown, loop, multple-depth loop, and include statement in template file.
  • TemplatePower - offers you the ability to separate your PHP code and your (HTML) layoutfile. It's simular to the popular template class FastTemplate, but than a lot faster (about 6x faster).
  • htmltmpl: templating engine - A templating engine for Python and PHP. Provides web application developers, who need to separate the program code and the design (HTML code) of their web application projects, with a templating tool that can easily be used by cooperating webdesigners with no programming skills.
  • MiniTemplator - compact template engine for HTML files. It features a simple syntax for template variables and blocks. Blocks can be nested.
  • Layout Solution - simplifies website development and maintenance. It holds commonly used variables and page elements, allowing you to focus on designing your pages rather than worrying about correctly duplicating common layouts over and over.
  • TinyButStrong - a library that enables you to create HTML pages dynamically. It enables you to easily display information from your database, but also to seriously harmonize and simplify your PHP programming. TinyButStrong is oriented to HTML but not specialized to Html. This means it can work as well with Text files, XML, RSS, RTF, WML, Excel (xml), ...
  • WACT - a template engine that separates code from design.
  • bTemplate - small and fast template class that allows you to separate your PHP logic from your HTML presentation code.offers you the ability to separate your PHP code and your (HTML) layoutfile. It's simular to the popular template class FastTemplate, but than a lot faster (about 6x faster).
  • QuickTemplate - a PHP extension for mananging templates and performing multi level variable and block interpolation.
  • VarPage - very simple PHP class for building websites based on Template files
  • FastTemplate - PHP extension for mamanging templates and performing variable interpolation, robust and flexible, and allows you to build very complex HTML documents/interfaces. It is also completely written in PHP and (should) work on Unix or NT.
  • Vemplator is PHP template engine that strives to be light-weight yet featured, and does quite well in only 200 lines of code. The template syntax is concise, and the code is written to be extensible. Though it may be somewhat strict (doesn't allow function calls from the template, among other things) it's very usable. The strictness is intended to constrain the template logic to that which relates to presentation.
See Also;

Monday, August 27, 2007

Red Hat Developer Studio - Introduction

The beta version of Red hat Developer Studio has been released recently. RHDS is a based on eclipse with set of pre-configured tools from JBoss IDE and Exadel Studio. RHDS gives us out of box and 100% open source platform for enterprise-level, innovative and scalable applications. RHDS enables you to create seam application, visually design JSF using AJAX components, generate entity beans from your database using Hibernate and much more...

I have downloaded the installer for Windows platform, and installation was pretty simple 8 step. JBoss is bundled with the installer.


Here is the Splashscreen of Red hat developer studio. Little bit heavy than standard eclipse release since it loads pretty much plugins.


The workspace is the one we are already familiar with. The first most important and biggest differences are rich component Palette, Web tab, and additional perspective.



The lovely palette contains pre-configured, useful tools, categorized in the following order.
  • HTML
    • All elements
  • JBoss
    • Ajax4jsf
    • RichFaces
    • Seam
  • JSF
    • Core
    • Facelets
    • HTML
  • JSTL
    • Core
    • Formatting
    • SQL
    • XML
  • MyFaces
    • Extensions
    • Sandbox
    • Tomahawk
  • Oracle ADF Faces
    • Core
    • HTML
  • Struts
    • Bean
    • Common
    • Form
    • HTML
    • Logic
    • Nested
    • Tiles
  • Struts Shale
    • Clay Plugin
    • Core
  • XHTML
    • List
    • Object
    • Structural
    • Table
    • Text
    • XForms
    • Basic
You can download the the beta for Windows and Linux from here. I strongly suggest you play with it and provide feedback to Red Hat. But better to wait for a or few more months, letting it to become more mature enough for real life projects.

See also;

Monday, August 20, 2007

Java decompilers and obfuscators

A Java decompilers are special type of decompiler which takes a class file as input and produces Java source code as output. Decompilers are very useful tools when you lost your source code. I have used only JODE from the below list. As you see, there are many free/open source decompiler and obfuscator alternatvices.

Decompilers
  • JODE - is a java package containing a decompiler and an optimizer for java. The decompiler reads in class files and produces something similar to the original java file.
  • JREVERSEPRO - a Java Decompiler/Disassembler, and reverse engineering utility written entirely in Java. The utlimate objective of this project is to provide a decompiler that generates a Java object-based structure that can be programmatically inspected using a specific API.
  • Jdec - is a java decompiler which currently supports classes compiled using java compiler from SUN Microsystems LTD
  • Dava - is a decompiler for arbitrary Java bytecode. It can be used to decompile bytecode produced by Java compilers, compilers for other languages (AspectJ, SML, C) that generate Java bytecode and tools like Java bytecode obfuscators, instrumentors and optimizers.
  • Jad - is a Java decompiler that reads one or more Java class files and converts them into Java source files which can be compiled again. Jad is a 100% pure C++ program and it generally works several times faster than decompilers written in Java. Jad doesn't use the Java runtime for its functioning, therefore no special setup is required. Jad is free for non-commercial use.
  • DJ Java Decompiler - is Windows* decompiler and disassembler for Java that reconstructs the original source code from the compiled binary CLASS files. DJ Java Decompiler is able to decompile complex Java applets and binaries, producing accurate source code.
  • HomeBrew Decompiler - Have you ever lost the source code to a Java program and thought there was no way to get your code back? Well fret no longer, HomeBrew Decompiler to the rescue!
  • DCompiler - The aim of this project is to develop a decompiler for java which is platform independent and has options to obfuscate the class file also. The project takes class file as input and decompiles it and provides the source file.
  • JCavaj Java Decompiler - is a free Java-based Java Decompiler. It reconstructs the original source code from a compiled binary CLASS file. You can decompile java applets, jar and zip files producing accurate java source code.
Obfuscators
  • Jarg - reduces the size of a jar file in which java class files are stored. As a result of processing by jarg, since a Java class file is optimized, it becomes quicker, and since it is renamed, it becomes that it is harder to be analyzed. That is, jarg is 'Java Optimizer', and it is 'Java Obfuscator' and is also 'Java Shrinker' or 'Java Reducer'.
  • Jshrink - is a Java obfuscator that extracts the minimal set of class files for an application, removes unused code and data, obfuscates symbolic names, finalizes code for optimized execution, and stores the results in a Java jar file.
  • yGuard - is a free Java bytecode obfuscator and shrinker that improves your software deployment by prohibiting unwanted access to your source code and drastically shrinking the processed Jar files at the same time.
  • JavaGuard - is a general purpose bytecode obfuscator, designed to fit effortlessly into your regular build and testing process, providing peace of mind that your valuable Java code is more secure against decompilation and other forms of reverse engineering.
  • Smokescreen - is a Java obfuscator. Aside from being able to change symbolic names, it can also modify the bytecode instructions in methods thereby obfuscating control flow. This makes the resulting obfuscated classes much more difficult to decompile.
  • RetroGuard - a general purpose Java obfuscator, is designed to fit effortlessly into your regular build and testing process, providing peace of mind that your valuable Java bytecode is more secure against decompilation. Free for academic or not-for-profit use, or open source development
  • ProGuard - is a free Java class file shrinker, optimizer, and obfuscator. It can detect and remove unused classes, fields, methods, and attributes. It can then optimize bytecode and remove unused instructions. Finally, it can rename the remaining classes, fields, and methods using short meaningless names. The resulting jars are smaller and harder to reverse-engineer.
  • JBCO - is a Java bytecode obfuscator. Obfuscators transform code to be more complex, esoteric, or otherwise obscure in order to hinder reverse-engineering nad decompilation attacks. JBCO is able to operate on Java class files or source and produces obfuscated Baf, Jasmin, or class files.
  • The Marvin Obfuscator - rewrites Java applications in a way that makes it almost impossible to decompile them and understand their inner workings.
See Also;
Checkout;
On internet, you’ll find several Java decompilers FAQs to help you resolve java plug-in errors. Trustworthy hosting providers i.e. hostmonster and ipowerweb provide dedicated servers, cheap domain name registration along with online help to install java plug-ins.

Monday, August 13, 2007

Most Useful Top 50+ Eclipse Plug-ins

I have compiled list of Visual Studio add-ons at my previous post. Now it is turn for Eclipse, the world's best ide ;) As you see the looong list, Eclipse has much bigger community that develops and provides plug-ins. All of the plug-ins are free or open source. I also have to mention that version compatibilities are the problem, you should be careful enough to check out the Eclipse versions that following plug-ins support.
  • Checkstyle integrates the well-known source code analyzer that helps you ensure that your Java code adheres to a set of coding standards.
  • Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE.
  • Mylyn is the Task-Focused UI for Eclipse that reduces information overload and makes multi-tasking easy. It does this by making tasks a first class part of Eclipse, and integrating rich and offline editing for repositories such as Bugzilla, Trac, and JIRA.
  • Copy Fully Qualified Class Name Just a great small feature, right click the file and get the full name with package listings.
  • EclipseUtils Plugins Stores where in the file your last where. Why is this not already built-in I don't know.
  • Colorer take5 is a syntax highlighting and text parsing library, that provides services of text parsing in host editor systems in real-time and transforming results into colored text. Result information allows to search and build outlined lists of functions, structures, and to search and indent programming language constructions (brackets, paired tags).
  • eUML2 Studio is a powerful set of tools developped from scratch for Eclipse. These tools are designed specially for developpers to put UML in action at the development level: ensure the software quality and reduce the development time.
  • JavaScript Plug-in by Harish Kataria
  • Implementors plugins add the possibility to jump to the implementation of an interface. Alternatively, you can jump to the interface of an implementation.
  • Gotofile plugin let you enter partial filenames in a "quicksearch" box and open the file directly
  • UMLet is an open-source UML tool with a simple user interface: draw UML diagrams fast, export diagrams to eps, pdf, jpg, svg, and clipboard, share diagrams using Eclipse, and create new, custom UML elements.
  • Metrics calculates various metrics for your code during build cycles and warns you, via the Problems view, of 'range violations' for each metric. This allows you to stay continuously aware of the health of your code base.
  • Violet UML Editor is a powerfull modeling software, easy to use, ready to work by Cay Horstmann. It draws nice-looking class, sequence, state, object and use-case diagrams.
  • FindBugs - a program which uses static analysis to look for bugs in Java code.
  • Flow4J is an Eclipse Plug-in for modeling process flows in a drag and drop manner. A process flow can contain process steps which can be linked together to a complex flow.
  • Doclipse helps you write Java source files with Javadoc tags, either for documentation purposes or to be processed by a tool such as EJBGen or XDoclet. New tags can be added to the plug-in by writing XML files defining the new tags and their attributes.
  • Spring IDE is a graphical user interface for the configuration files used by the Spring Framework.


  • The PDT project is working towards providing a PHP Development Tools framework for the Eclipse platform. This project will encompass all development components necessary to develop PHP and will facilitate extensibility.
  • QuickREx gives you a view in which you can enter test-texts and try regular expressions. The expressions are evaluated against the test-text on the fly, matches are highlighted and you can navigate between the matches. You can also navigate through groups within each match.
  • JadClipse is a plug-in that seamlessly integrates Jad (the fast Java decompiler) with Eclipse
  • PMD scans Java source code and looks for potential problems like possible bugs, dead code, suboptimal code, overcomplicated expressions and duplicate code.
  • PHPEclipse - plug-in for PHP Development. It takes advantage of a robust and widely used application framework
  • TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use.
  • Eclipse SQL Explorer is a thin SQL client that allows you to query and browse any JDBC compliant database. It supports plugins with specialized functionality for individual databases (Oracle, DB2 and MySQL) and can be extended to include specialized support for other databases.
  • CFEclipse project is to create a plugin for the Eclipse platform that provides a professional quality IDE for CFML developers.
  • JyDT aims to provide the development tools expected by a Jython developer. The project was started by Red Robin in November 2003 and is carried out with limited resources.
  • EPIC is an open source Perl IDE based on the Eclipse platform. Features supported are syntax highlighting, on-the-fly syntax check, content assist, perldoc support, source formatter, templating support and a Perl debugger.
  • Jalopy is a source code formatter/beautifier/pretty printer for the Java programming language. It is aimed to provide a full-featured, yet free alternative to the well-known Jindent. Plug-ins for Ant, Eclipse, IDEA, JBuilder, JDeveloper, jEdit, NetBeans.
  • Mevenide aims to integrate Maven into standard IDEs. Right now Mevenide provides support for Eclipse, NetBeans, JBuilderand IntelliJ IDEA.
  • Veloeclipse is a HTML/Velocity Editor for Eclipse, it is based on veloedit for velocity parsing and outline but adds all the html features you would d expect to find in a html editor.
  • Log4E helps you to use your logger easily in Java Projects. The Plugin Log4E is not bound to any special logging framework. Thus you might be able to adapt to your own logger by defining your own templates using the preferences. It has active support for Log4j, Commons Logging and JDK 1.4 logging.
  • Eclipseutilplugins - Set of small plug-ins to Eclipse for simplification of a life to programmers.
  • Continuous testing uses excess cycles on a developer's workstation to continuously run regression tests in the background, providing rapid feedback about test failures as source code is edited. It reduces the time and energy required to keep code well-tested, and prevents regression errors from persisting uncaught for long periods of time.
  • Ldap Tools delivers tools for working with LDAP from within Eclipse.
  • The RMI Plug-in for Eclipse is the most comprehensive solution for developing Java RMI systems using the Eclipse platform.
  • Image Export Plug In allows exporting GEF diagrams to “images” in several formats in a generic and extensible way.
  • green is a LIVE round-tripping editor, meaning that it supports both software engineering and reverse engineering. You can use green to create a UML class diagram from code, or to generate code by drawing a class diagram.
  • EPF aims at producing a customizable software process engineering framework, with exemplary process content and tools, supporting a broad variety of project types and development styles.
  • VSS Plugin for Eclipse - integrated in the IDE environment and provides support for all daily VSS operations.
  • SSH Console is a plugin which permits you to connect to an SSH Server and use it like a local shell.
  • FacesIDE is an Eclipse plugin for web application development that used JSF It requires Eclipse 3.0 (or higher), JDT, GEF and EclipseHTMLEditor.
  • LogWatcher adds a view to Eclipse that allows log files to be monitored for changes, similar to the Unix tail utility.
  • Lomboz is an eclipse plug-in for J2EE developers by extending eclipse JDT. It employs some of the proven open-source technologies. Supporting the complete development cycle: Code, deploy, test and debug.
  • ServerEclipse is a set of plugins that provides a basic web-application development environment Eclipse 3.0. ServerEclipse provides IDE utilties (editors, code highlighting, etc) for JSP, XML, HTML, CSS and *.properties files.
  • ResourceBundle Editor - for edit localized properties files. It allows you to manage key/value information for all related properties files at once, through the same screen
  • RSS View is a news reader for RSS and Atom feeds designed to integrate into the Eclipse workspace.
  • FreeMem is a graphical memory monitor that keeps track of the memory used by Eclipse's virtual machine.
  • Eclipse profiler - plugin for profiling Java applications inside of Eclipse. NOTE! Project is dead and does not work on new versions of Eclipse.
  • Hibernate Synchronizer is a free plugin code generation tool to be used with the Hibernate persistence framework.
  • HTML Tidy enables you to format and check (X)HTML or XML code.
  • Jlint will check your Java code and find bugs, inconsistencies and synchronization problems by doing data flow analysis and building the lock graph.
  • JSEditor provides basic JavaScript editing functions such as syntax hi-lighting and content outlining.
Resources, Links and Plug-in Directories
See Also;

Tuesday, August 7, 2007

Refactoring Tools for Java and .NET

Refactoring is the process of changing a software system in such a way that it does not alter the external behavior and result of the code yet improves its readability and internal structure. Object oriented developers recognize the value of refactoring working code. Until recently good tools have not been available. This list contains Refactoring tools and IDEs features Refactoring support.

Java
Eclipse - provides a powerful set of automated refactorings that, among other things, let you rename elements, move classes and packages, create interfaces from concrete classes, turn nested classes into top-level classes, and extract a new method from sections of code in an old method. Becoming familiar with Eclipse's refactoring tools is a good way to improve your productivity.
IntelliJ Idea - features totally unmatched refactoring capabilities. Rich set of refactorings (50+) covers virtually every aspect of code transformation and lets you effectively maintain and upgrade your projects. All refactorings are aware of supported languages and technologies like Java, XML, JSP, EJB, Javascript and Ruby and provide an effective way to flexibly manage your code.
RefactorIt - tool for Java developers. A developer can take source code of any size and complexity and rework it into well-designed code by means of over automated refactorings. It may be used as a stand-alone tool or installed as a plug-in to Eclipse, NetBeans, JDeveloper, and JBuilder.

JRefactory - a plug-in for JBuilder, NetBeans, and Jedit. Also does UML diagrams.

Transmogrify - Java source analysis and manipulation tool. The current focus of Transmogrify is as a cross-referencing and refactoring utility.Available as a plug-in for two IDEs: Borland's JBuilder, and Sun's Forte4Java.

JafaRefactor - provides a means of automatically refactoring compilable Java source code using a small catalog of refactoring patterns. This currently includes class, field, method, and package renaming and PushDown and PullUp of methods and fields in an inheritance hierarchy. Other refactorings should be added in a future version.
XRefactory - an emacs plug-in that is professional development tool for C and Java providing code completion, source browsing and refactoring.

JBuilder - Borland's primary tool offers some refactoring support. Various plug in tools offer deeper support.
JFactor - a plug-in tool - works with JBuilder and Visual Age. Instantiations is a well respected outfit with a long history in Smalltalk and Java VM and compiler technology.

.NET
ReSharper - brings unrivalled code analysis, a superior unit testing solution, Go to Symbol navigation, a handy To-do Explorer with multiple unit test sessions, and many other features - to boost individual and team productivity in the world of .NET development.

C# Refactory - performs a large number of refactorings, allowing you to re-shape your c-sharp code as needs arise. Refactoring is an essential part of the extreme programming development approach. C# refactory enables you to automate many refactorings thus increasing the reliability and speed with which you can refactor your c-sharp code.

Refactor! - free version code refactoring tool includes 29 time-saving refactorings and is available to all developers working in Visual Studio 2005 and Orcas Beta 1.

Visual Assist X - Refactoring tool for Visual Studio handling all three .NET languages. Features are suggestions, acronyms and autotext, enhanced syntax coloring, case correction and error underlining, easy access to methods, and hovering class browser

JustCode! enhances Visual Studio with solution-wide on-the-fly error checking, smart code navigation features, refactoring and other powerful coding tools for C#, J#, Visual Basic .NET, ASP.Net, JavaScript and HTML.

Please visit Martin Fowler's site for more refactoring resources.

See Also;

Sunday, July 22, 2007

J2EE vs ASP.NET vs PHP

In this article, I wanted to compare the web application development platforms which I have been using for recent years. My comparison has no aim to make one platform better than others, or vice versa. These are all my own thoughts and what I have experienced during the development of web applications using the three platforms. It is open to you to express your opinions and stands as a comment.
Scores mean
10 – Best.
9 – Very Good.
8 – Good.


Syntax

I love Java syntax, a real object oriented syntax. PHP have some odd characters like “->, ::” and function calls are made directly like “substr, strreplace” which makes me feel like using procedural language. For ASP.NET, I have been using VB.NET.

J2EE: 10, ASP.NET: 9, PHP: 8

Easy to Learn
Believe or not, I learned PHP in two weeks. One day I decided to learn PHP and visited PHP official website. The website had one question explaining what is PHP and how and where to start. Manuals, documentation and samples were all there and ready to download. To prepare development environment was straight easy. ASP.NET was also easy to learn but bit difficult than PHP. J2EE was the most difficult and long process for me.

J2EE: 8, ASP.NET: 9, PHP: 10

Development Speed
For simple, small-size and CRUD applications, ASP.NET is the fastest one because of the pre-implemented controls, components and APIs. In PHP, if you use the right framework, it is also fast process.

J2EE: 8, ASP.NET: 10, PHP: 9

Platform
Although PHP works best on LAMP (Linux, Apache, MySQL and PHP) environment, you can deploy PHP web applications on other platforms such as Windows, Solaris etc…
ASP.NET have only one choice; Windows. There is a Mono tool for development and deployment of ASP.NET on Linux, but not ready for enterprise use. J2EE runs best everywhere.

J2EE: 10, ASP.NET: 8, PHP: 9

Database
Simplest theory is MySQL for PHP, Oracle for J2EE and MSSQL for ASP.NET. There are many other good databases out there. You can use most of them with all three languages by adding or installing appropriate drivers.

J2EE: 10 , ASP.NET: 10, PHP: 10

IDE – Integrated Development Environments
ASP.NET has only one choice, Visual Studio which is very cool IDE but costs puff ;) PHP have commercial and open source IDE-s. Most known PHP IDEs are Zend Studio and PHP Coder as far as I know. J2EE has nice open source choices as well as commercial. Eclipse is the most used and best IDE I have ever used. With its plug-in structure, you can use Eclipse almost for all purposes, even for PHP development. Beside Eclipse, there are some more good IDE-s like IntelliJ, Netbeans, Sun Studio etc…

J2EE: 10 , ASP.NET: 10, PHP: 9

OOP – Object Oriented Support
J2EE and ASP.NET win here. PHP have OOP support in its latest versions.

J2EE: 10, ASP.NET: 10, PHP: 9

AOP – Aspect Oriented Support
J2EE have some AOP frameworks one of which I have used. I don’t know whether ASP.NET and PHP supports AOP or not.

J2EE: 10 , ASP.NET: 9, PHP: 9

Security
J2EE is the most secure one I guess. Once, I had my PHP web application hacked by someone. So PHP is secure only when you code secure ;) For ASP.NET, people have some doubts because of previous versions of windows security holes and hells. I didn’t experience any security problem of ASP.NET till now.

J2EE: 10, ASP.NET: 9, PHP: 9

Performance
I liked PHP Performance. For web applications I have ever developed, the most satisfied application was written in PHP. J2EE was little bit heavier to start, and consumes huge system resources. I have not tested my ASP.NET applications against huge loads in real life. Till now, I didn’t have any complaint about performance of my ASP.NET applications.
J2EE: 9 , ASP.NET: 9, PHP: 10

Web Server
ASP.NET has only one choice; IIS. For PHP and J2EE, you have plenty of choices; commercial and open source. Apache is the most popular one for PHP. Sun AS, JBoss AS, Oracle AS, Weblogic, Tomcat, and some more are for J2EE. Most of the J2EE servers cost high.

J2EE: 10, ASP.NET: 9, PHP: 10

Libraries and Frameworks
All of three languages have third party libraries and frameworks. In PHP and J2EE, most of the frameworks and libraries are open source or free. In ASP.NET, most of the libraries and components out there are commercial.

J2EE: 10, ASP.NET: 9, PHP: 10

Support and Community
There are plenty of forums, mailing lists, user groups, communities, developers, blogs and websites for all of three platforms. Most of the ASP.NET support, documentation and forums are managed by Microsoft, while PHP support is given by developers itself. J2EE have both commercial and open source support groups.

J2EE: 10, ASP.NET: 10, PHP: 10

Cost
PHP have big advantage on cost, both TCO and Maintenance. You can have IDE, Web Server, Operating System and Database all for FREE ;)
For ASP.NET development, first you have to pay for Visual Studio, then for Windows Server and for MSSQL. I don’t how much it costs total because my company already paid for them. For J2EE, you have choices. As I mentioned before, there are commercial and open source tools and software available. It depends on you and your company whether to use commercial, supported alliances or not. For example, if you plan not to pay, you can use Eclipse as an IDE, Tomcat or JBoss as a server, MySQL as a database.

J2EE: 9, ASP.NET: 8, PHP: 10

Conclusion
These three platforms are the most popular platforms for web development (of course, here we should mention Ruby On Rails, Django and few more ;) and they all have some advantages and disadvantages against each others. You have to choose the right platform according to the project behavior, size and scope, but also the criteria I listed above. I will not sum the total scores which will be unfair since I didn’t list all the available features of the platforms.

Related Comparisons and Discussions

See Also;
  1. Most Useful 20+ Visual Studio Add-ins
  2. ASP.NET AJAX Resources, Samples, Articles, Tutorials
  3. What is Microsoft Silverlight? Silverlight Resources, Articles and Tutorials
  4. AJAX Frameworks and Resources
  5. SQL Injection Resources
  6. Prevent robots from submitting data
  7. Frameworks are more important than Programming Languages
  8. Programming Handbooks and Cheatsheets

Sunday, July 8, 2007

Prevent robots from submitting data

Spam is/was/has been the biggest problem in the internet. Even in your application. You are developing and testing your web application, it works perfect. but when you deploy it on the internet, huge amount of data is submitted by someone, which is very big problem for you. So you have to prevent from spam like data submission. People have tried many methods to protect from spams, by the time the only method is proven and accepted as standard. Challenge/response CAPTCHA method. According to Wikipedia, CAPTCHA ("Completely Automated Public Turing test to tell Computers and Humans Apart") is a challenge response test which is used to check if the user is human or not. CAPTCHA is used exclusively in applications where user input is required. These applications include blogs, forums, and portals. From the following resources, you can find CAPTCHA implementations and tutorials in your preferred platform.

ASP.NET

Java

PHP

Rails

Programming Handbooks and Cheatsheets

Cheat sheets are useful one page document which you should print out and post it on the wall from of your eyes. It helps you to learn the subject more quickly, and saves your time.


PHP

AJAX

CSS

Perl

.NET
Python

Javascript

Ruby on Rails

Java

JSP

Javascript

HTML

Unix

Linux

C

C++
C#

Django

SQL

Web Development
Others
See Also;

Run your asp.net application on Linux


As you know, there is an big effort on porting .NET framework into Linux environment, project named "Mono" sponsored by Novell. Most of the frameworks are already implemented successfully. But it seems not enough for me when i try Mono and Mono development environment on my Ubuntu. Code completion is not working correctly, or i couldn't make it work, or i was so familiar with Visual Studio. It seems Visual Studio is the only choice when you are making development on .NET Environment.

Most of the Open Source or Java developers don't want to run application under Windows Server or on IIS. But you have application already written on ASP.NET 2.0 which you wish to host on Linux box. There is a choice anymore; "Grasshopper". For me, Grasshopper is created with the idea "If you can't change the development environment, you can change the deployment one". Because Mono effort is going on long time, but there was not enterprise level release since ever. This is the definition you can find on Grasshopper official site.

What is Grasshopper?

For most .NET developers, there is simply no substitute for the Visual Studio® IDE, the .NET Framework, and either Visual Basic or C#. With Grasshopper, you can use your favorite development environment from Microsoft® to deploy applications on Java-enabled platforms such as Linux®.


Grasshopper is the freely available Developer Edition of Mainsoft® for Java™ EE, a Visual Studio plug-in that you can use to create server and ASP.NET applications, or port existing .NET 2.0 applications on Linux and other Java-enabled platforms, without having to re-engineer your code in Java. Grasshopper 2.0 introduces support for the Visual Studio 2005 development environment, Visual Basic, and C# 2.0, including the generics language feature, the .NET Framework 2.0, and ASP.NET 2.0 controls. Use Grasshopper and the Visual Studio IDE to code, compile, debug, and deploy your application natively on the Java EE platform.

Give it a try -> http://dev.mainsoft.com/

Good luck