Sunday, August 12, 2007

PHP 101: PHP For the Absolute Beginner

PHP 101: PHP For the Absolute Beginner

This area is intended for everyone new to PHP. It opens with a series of informal, entertaining tutorials written by Vikram Vaswani, founder and CEO of Melonfire. These tutorials build on a previously-published 5-part series which has now been updated and extended to embrace PHP 5, making parts of it suitable for those of you who already have worked with PHP 4 in the past.

Tutorial by Vikram Vaswani.

If you came here to learn about elementary PHP 4 or basic PHP 5, this is for you. Enjoy!

PHP 101 (part 1): Down the Rabbit Hole [July 17, 2004]
An introduction to PHP’s variables and operators.

PHP 101 (part 2): Calling All Operators [July 18, 2004]
The rest of the PHP operators (there are many), and simple form processing.

PHP 101 (PART 3): Looping the Loop [July 19, 2004]
Basic control structures explained.

PHP 101 (PART 4): The Food Factor [July 20, 2004]
Arrays, PHP array functions, and what it all means.

PHP 101 (PART 5): Rank and File [July 21, 2004]
Everything you’re ever likely to need to know about dealing with external files from a PHP script.

PHP 101 (PART 6): Functionally Yours [July 28, 2004]
All about functions, arguments, passing by reference, globals and scope.

PHP 101 (PART 7): The Bear Necessities [August 07, 2004]
A gentle introduction to object oriented programming in PHP 4 and PHP 5.

PHP 101 (PART 8): Databases and Other Animals [August 31, 2004]
All about connecting to a MySQL database from PHP, using the mysql or mysqli extensions.

PHP 101 (PART 9): SQLite My Fire! [September 16, 2004]
Introducing another database: SQLite.

PHP 101 (part 10): A Session In The Cookie Jar [October 3, 2004]
Sessions and cookies – how to keep track of visitors to your site.

PHP 101 (part 11): Sinfully Simple [October 3, 2004]
An introduction to PHP’s easiest method for dealing with XML.

PHP 101 (part 12): Bugging Out [January 30, 2005]
Basic error handling.

PHP 101 (part 13): The Trashman Cometh [February 27, 2005]
A primer in basic security.

PHP 101 (part 14): Going to the Polls [March 8, 2005]
Putting the pieces together – a first Web application.

PHP 101 (part 15): No News is Good News [June 4, 2005]
Creating a simple RSS news aggregator.

source(s): zend - devzone

Thursday, August 9, 2007

New elements in HTML 5 - Structure and Semantics

New elements in HTML 5 - Structure and Semantics

Hypertext Markup Language (HTML) 5 introduces new elements to HTML for the first time since the last millennium. New structural elements include aside, figure, and section. New inline elements include time, meter, and progress. New embedding elements include video and audio. New interactive elements include details, datagrid, and command.

Development of Hypertext Markup Language (HTML) stopped in 1999 with HTML 4. The World Wide Web Consortium (W3C) focused its efforts on changing the underlying syntax of HTML from Standard Generalized Markup Language (SGML) to Extensible Markup Language (XML), as well as completely new markup languages like Scalable Vector Graphics (SVG), XForms, and MathML. Browser vendors focused on browser features like tabs and Rich Site Summary (RSS) readers. Web designers started learning Cascading Style Sheets (CSS) and the JavaScript™ language to build their own applications on top of the existing frameworks using Asynchronous JavaScript + XML (Ajax). But HTML itself grew hardly at all in the next eight years.

updated and upgraded version of classic HTML. More recently, the W3C took note of these developments and started its own next-generation HTML effort with many of the same members. Eventually, the two efforts will likely be merged. Although many details remain to be argued over, the outlines of the next version of HTML are becoming clear.

This new version of HTML—usually called HTML 5, although it also goes under the name Web Applications 1.0—would be instantly recognizable to a Web designer frozen in ice in 1999 and thawed today. There are no namespaces or schemas. Elements don't have to be closed. Browsers are forgiving of errors. A p is still a p, and a table is still a table.

At the same time, this proverbial unfrozen caveman Web designer would encounter some new and confusing elements. Yes, old friends like div remain, but now HTML includes section, header, footer, and nav as well. em, code, and strong are still present, but so are meter, time, and m. img and embed continue to be used, but now there are video and audio too. However, closer inspection by the caveman designer would reveal that these elements aren't that different. Many of them might be things the designer needed back in 1999 but didn't have. All these new elements are easily learned by simple analogy with elements the designer already understands. In fact, they're a lot easier to learn than Ajax or CSS.

Finally, when the caveman fired up the 300MHz laptop running Windows 98 that was also frozen in 1999, they might be astonished to realize that the new pages display fine in Netscape 4 and Windows® Internet Explorer® 5. Sure, the browser wouldn't recognize or do anything with the new elements, but the page still displays, and the content is all there.

That's not a happy coincidence. HTML 5 was explicitly designed to degrade gracefully in browsers that don't support it. The reason is simple: We are all cave people. Browsers now have tabs, CSS, and XmlHttpRequest, but their HTML renderers are stuck in 1999. The Web can't move forward without accounting for the installed base. HTML 5 understands this. It offers real benefits to page authors today while promising even more to page readers tomorrow as browsers are slowly upgraded. With that in mind, let's look at what HTML 5 brings you.


Even well-formed HTML pages are harder to process than they should be because of the lack of structure. You have to figure out where the section breaks go by analyzing header levels. Sidebars, footers, headers, navigation menus, main content sections, and individual stories are marked up by the catch-all div element. HTML 5 adds new elements to specifically identify each of these common constructs:

  • section: A part or chapter in a book, a section in a chapter, or essentially anything that has its own heading in HTML 4
  • header: The page header shown on the page; not the same as the head element
  • footer: The page footer where the fine print goes; the signature in an e-mail message
  • nav: A collection of links to other pages
  • article: An independent entry in a blog, magazine, compendium, and so forth

Some Examples found here.


Tuesday, August 7, 2007

Open Source Profilers in Java

Open Source Profilers in Java

NetBeans Profiler is a project to provide a full-featured profiling functionality for the NetBeans IDE. The profiling functions include CPU, memory and threads profiling as well as basic JVM monitoring, allowing developers to be more productive in solving memory or performance-related issues.

The Java Application Monitor (JAMon) is a free, simple, high performance, thread safe, Java API that allows developers to easily monitor production applications. JAMon can be used to determine application performance bottlenecks, user/application interactions, and application scalability. JAMon gathers summary statistics such as hits, execution times (total, average, minimum, maximum, standard deviation), and simultaneous application requests. JAMon statistics are displayed in the clickable JAMon Report.

Profiler4j is a simple-to-use CPU profiler Java that supports remote profiling and on-the-fly configuration. Its main features are: (1) Based on dynamic bytecode instrumentation. (2) 100% Java. (3) No native library or executable is required. (4) It provides views with call graph, call tree, memory monitor, and class list. (5) Supports fine-grained configuration that can be easily tuned without restarting the profiled JVM. Only the methods you want to profile are instrumented.

JBoss Profiler is a log based profiler using the JVMPI system. It uses an agent written in C that captures events from the JVM and logs them to disk. A web application running on JBoss or another machine can be used to analyze these logs through a web browser.

MessAdmin is a notification system and Session administration for J2EE Web Applications, giving detailed statistics and informations on any Web application. It installs as a plug-in to any Java EE WebApp, and requires zero-code modification.

InfraRED is a tool for monitoring performance of a J2EE application and diagnosing performance problems. It collects metrics about various aspects of an application's performance and makes it available for quantitative analysis of the application.

JRat is the Java Runtime Analysis Toolkit. Its purpose is to enable developers to better understand the runtime behavior of their Java programs. The term "behavior" includes, but is not limited to performance profiling.

DJProf is an experimental tool for profiling Java programs which employs AspectJ to insert the necessary instrumentation for profiling rather than, for example, the Java Machine Profiler Interface (JVMPI). DJProf can be used to profile Java programs without modification (i.e. there is no need to recompile them for profiling) and does not require the user to have any knowledge of AspectJ.

Extensible Java Profiler (EJP) is an open-source profiling tool for Java with a scalable and extensible architecture, allowing its usage for exotic programming languages that use a Java backend.

TomcatProbe is a real-time monitoring and management tool for Apache Tomcat. It is very easy to deploy and requires no modification to either Tomcat or running applications. Tomcatprobe allows real-time monitoring of deployed applications and their status, active http sessions and their attributes, datasources, their details and current usage. It also shows requests that are being executed, sizes of application footprints in memory, enables on-the-fly application deployment with JSP precompilation. System information view displays Java runtime version, graphical memory usage, OS information and system properties. "Quick check" options allows to check usage of all resources including all datasources, file handles and memory in one click.

JMeasurement is a free and simple java api for monitoring runtime and usage (count, parallel activation, last activation, deviation...) of user defined points in java production code. It an automatically monitor Interface methodes. There are renderers for text, csv and HTML. It is simple to use and extended.

JIP is a high performance, low overhead code profiler for Java. It's main features are: 1. It's written entirely in Java and needs no native components. 2. It allows the developer to filter which classes and packages are profiled. 3. There are many options available for controlling the output of the profiler. This makes it easier to manage all of the data that can be generated. There is also an XML output option which makes it easy to manipluate the output using other programs. 4. JIP is interactive, allowing the developer to turn the profiler on and off while the JVM is running. This makes it particularly well suited for profiling web applications. 5. JIP is available under the BSD license.

JMemProf is a live Java memory profiler suitable for deployment in web containers such as JBoss, Tomcat and others. JMemProf allows you to retrieve memory profile information while your application is running.

JMP is a profiler for java that can be used to trace objects usage and method timings. JMP uses the JVMPI interface to gather statistics and interact with the JVM. JMP uses a GTK+ interface to show the status.

DrMem A simple heap profiler for Java, based on JVMPI. The profiler can be attached to a non-interactive JVM, creating heap statistics from time to time.

JHAT is a Java heap dump browser. This tool parses a Java heap dump file (for example, one produced by jmap -dump, see above). jhat starts a web server that allows objects in the heap to be examined in a web browser. This tool is not meant to be used on production systems and is meant for "offline" analysis of heap dumps. The jhat tool is platform independent in the sense that it can be used to view heap dumps produced on any platform. For example, it is possible to view a heap dump produced on the Solaris OS by using jhat on Linux.
Homepage JHAT Java Heap Analysis Tool

JMAP If this tool is run without any options (other than pid or core), then it displays information similar to that of the Solaris pmap tool. This tool supports several other options for Java heap observability.
Homepage JMAP Java Memory Map

Monday, August 6, 2007

Learning JavaFX - Links

Learning JavaFX - Links

An Introduction of JavaFX Script to Java Programmers (Part 1)
By Robert Eckstein and the Authors of the JavaFX Programming Language Reference, July 2007
JavaFX Script is a highly productive scripting language that enables content developers to create rich media and content for deployment on Java environments. This article, aimed at traditional Java developers, is a brief but thorough introduction to Sun's exciting new technology.

JavaFX Pad -
A JNLP that starts the JavaFX Pad application, wuhich will allow yo to iteratively enter JavaFX code and watch the results at the same time.

OpenJFX Website - The Official Site for JavaFX Technology.

Getting started with the JavaFX Script for Swing Programmers - This tutorial shows you how to use the graphical widgets present in the JavaFX scripting language. Because many of these widgets map directly to the underlying Swing components, those who are familiar with programming Swing will be able to read quickly through this document.

JavaFX Script 2D Graphics Tutorial - Similar to JavaFX Pad, this JNLP will help you learn to use the 2D graphics functionality inside JavaFX technology.

The JavaFX Script Programming Language Reference - The official reference of JavaFX.

Thursday, August 2, 2007

Wallpaper competition for KDE 4, now Open!

Wallpaper competition for KDE 4, now Open!

The Oxygen team has announced that they are running a contest to get a wide array of beautiful, usable and new wallpapers for inclusion in KDE 4.0. See website for submission details. Must be open source licensed and original content, with Photos preferred. Good luck!

Try your luck here!