News

IncludeJS - include and compress JavaScript easily

Justin Meyer has been working on a JavaScript library named IncludeJS and has released a 0.1 alpha 1 Developer package. IncludeJS lets developers include and compress JavaScript files easily. The hope for the library is "to bridge the gap between frameworks like jQuery/Prototype which guess at what you will most likely need, and frameworks like MooTools, which are great if you know exactly what you want and don't need to look in the source."

IncludeJS was originally a component of JavaScriptMVC - an open source JavaScript Model-View-Controller framework. The framework is going through some major changes and individual components are being extracted to make each individually useful.

Features of IncludeJS:

Relative paths.

Instead of including files relative to the current page's url,
IncludeJS includes files relative to your JavaScript files' urls.
Forget about scanning the page's script tags for your library's path.
IncludeJS lets you organize your scripts however you want.

Dynamic compression.

IncludeJS uses Dean Edwards packer
to automatically compress your
JavaScripts. Unlike server-side compression scripts,
compression is determined at runtime. This makes
it easy to compress large libraries with optional plugins.

Highlights.

- Consistant include order (last-in-first-out)
- FF 1.5+, IE 6+, Opera 9, Safari 3.
- Works with libraries like Prototype and jQuery.
- MIT license.
- 3 KB compressed.
- Files visible in Firebug.

Usage

1) Include the library in your page

<script src="include.js" type="text/javascript">
</script>

2) Include JavaScript files with the include function, files are relative to the including file and will be included in LIFO [last-in-first-out] order.

<script type="text/javascript">
   include( 'javascripts/prototype',
            'javascripts/myapplication'
   )
</script>

3) Compress your app by adding the line:

include.setup('compress')

before your includes, after the page loads you're presented with a compressed version of the code.

<script type="text/javascript">
   include.setup('compress')
   include( 'javascripts/prototype',
            'javascripts/myapplication'

   )
</script>

4) Run it! After you've saved the compressed version of the code, change the "compress" argument to "production" and specify the path to the newly created library as a second argument.

<script type="text/javascript">
   include.setup('production','path/to/prod')
   include( 'javascripts/prototype',
            'javascripts/myapplication'
   )

</script>

Visit the IncludeJS Homepage

Check out the demo over at JavaScriptMVC.com

Microsoft + Yahoo! = Micrahoo!?

Tagged:  

I'm sure that you have already heard about the possibility of Microsoft buying Yahoo!. I'm not going to go in to much detail about deal, as I'm sure that you've already had your fill of that. Instead, I want to take a brief look into how this may affect Yahoo! in the future.

If Microsoft does in fact buy Yahoo!, it is very possible that all new development will be using Microsoft technologies instead of the current technologies. When I heard of this deal, the first thing I thought was that all the future development will be done in .NET technologies and run on Windows servers (can you say "nightly reboot"?).

From a web developers perspective, I really like the work that Yahoo! has done with the Yahoo! User Interface toolkit, but if Microsoft buys Yahoo!, will development stop as Microsoft tries to push Silverlight? Not to mention the possibility of abandoning JSON as Microsoft seems to prefer XML for Ajax applications.

I personally look at this with the worry that Yahoo! will stop being an innovator, as Microsoft looks to compete with Google and push their own technologies.

I would love to hear your thoughts on this, you can leave a comment or write a blog post with your free account on this site (once you login click on "Create content" => "Blog entry").

Ajaxonomy's del.icio.us Spy - Released!

Tagged:  

You are probably familiar with Digg Spy, but I was very surprised when I found out that there was no similar application for del.icio.us (if you are not familiar with del.icio.us it is a great social bookmarking site).

So, we at Ajaxonomy we decided to make our own del.icio.us spy application. The application allows you to see the latest bookmarks being added to del.icio.us so that you can find great new sites. The application also includes links to help make it easy to share what you find with others.

The application allows you to filter results (i.e. type in "web" and you will only see links containing the word web) and to be notified (via sound) when new items are added. The application also allows you to pause the items that are shown so if you find something you like you can see it for a while.

You can go to the application by clicking here. The application will also be available in the Ajaxonomy Labs section on the right bar of this blog.

As with all the applications in the Ajaxonomy Labs section, this application is open source and you can download the source code here.

Book: The Art & Science of JavaScript

Tagged:  

If you haven't heard, a new JavaScript book is out on the market. The text is published by Sitepoint and is coauthored by James Edwards, Michael Mahemoff, Ara Pehlivanian, Cameron Adams, Dan Webb, Christian Heilmann and Simon Willison.

Who the publisher says the book is for:

This book is targeted at intermediate JavaScript developers who want to take their JavaScript skills to the next level without sacrificing web accessibility or best practice. If you’ve never written a line of JavaScript before, this probably isn’t the right book for you—some of the logic in the later chapters can get a little hairy.

If you have only a small amount of experience with JavaScript, but are comfortable enough programming in another language such as PHP or Java, you’ll be just fine—we’ll hold your hand along the way, and all of the code is available for you to download and experiment with on your own.

And if you’re an experienced JavaScript developer, we would be very, very surprised if you didn’t learn a thing or two. In fact, if you only learn a thing or two, you should contact us here at SitePoint—we may have a book project for you to tackle!

What they say you'll learn:

* Create a slick Google Maps and Flickr mashup.
* Build your own fully accessible 3D maze.
* Have some fun with draggable and sortable table columns.
* Give your site some extra personality with client-side badges.
* Write better code faster using metaprogramming techniques.
* Create stunning vector graphics using the canvas element.
* Become a debugging expert using pro-level Firebug tricks.

What's in the TOC:

Chapter 1: Fun with Tables
Chapter 2: Creating Client-side Badges
Chapter 3: Creating Vector Graphics with canvas
Chapter 4: Debugging and Profiling with Firebug
Chapter 5: Metaprogramming with JavaScript
Chapter 6: Building a 3D Maze with CSS and JavaScript
Chapter 7: Flickr and Google Maps Mashups

Visit the book's homepage at Sitepoint

If you've had a chance to start reading this book, please post your review in the comments.

OpenID: Do you Yahoo!?

Yahoo! has just announced that it would begin supporting OpenID 2.0 technology for both yahoo.com and flikr.com by the end of the month.

Yahoo!’s initial OpenID service, which will be available in public beta on January 30, enables a seamless and transparent web experience by allowing users to use their custom OpenID identifier on me.yahoo.com or to simply type in “www.yahoo.com” or “www.flickr.com” on any site that supports OpenID 2.0.

Full Press Release

With the addition of 248 million Yahoo! users, the OpenID user community essentially triples in size (going from an estimated 120 million users to 368 million).

More information regarding Yahoo!'s OpenID support can be found here.

Find the Stories Digg Doesn't want You to Find

Tagged:  

Ajaxonomy's Digg Bury Recorder has added a new feature, you can now see the top buried stories. Our hope with this new feature is that you might find interesting stories that you may not otherwise know about.

You can also search for the top buried stories for a particular subject. So, if you want to see the top buried Ron Paul stories, just search for Ron Paul and you will get quite a few results. Another couple of searches to try are iPhone and SEO.

The Top Buried stories are based on data from Ajaxonomy's Bury Recorder (some have started referring to it as ABR). ABR gets the bury data from all upcoming and popular stories, however once the story is fully buried (or auto buried which would possibly show no buries) it will not record any buries from the story as it has been fully buried. This means if a story is fully buried the last recorded bury is the bury that pushed it over the edge.

We hope that this list will be a welcome addition to the ABR. If you have any suggestions or questions about the ABR please leave a comment or if you think it would make a good blog post then sign up for a free account on this blog and write a story about it.

The below links will take you to the Ajaxonomy's Bury Recorder new feature and the application.
Digg's Top Buried Stories
Ajaxonomy's Bury Recorder

iGoogle Themes API is Now Available

Tagged:  

You've all used (or heard of) the iGoogle portal and probably have seen its many cool themes. Google has now opened up a Themes API to allow designers to build their own themes.

3 Steps to Building a Theme
1) designing images for the header and footer
2) entering metadata and color information in an XML file
3) and submitting the theme.

To find out more about the API, start with the developer guide.

Also check out these example themes, which, along with themes you submit, will be available in the new themes directory for the millions of iGoogle users:

Earth-light by Yves Behar, founder of the San Francisco design studio fuseproject:

Adventures in Lollipopland by Mark Frauenfelder, writer, illustrator, co-founder of Boing Boing, and editor-in-chief of Make Magazine:

Supermoto Mayhem by Troy Lee, designer and founder of Troy Lee Designs:

Simplicity is Complex by John Maeda, graphic designer, artist, Associate Director of Research at the MIT Media Laboratory, and recently named as the next President of the Rhode Island School of Design (RISD):

Visit the Themes API Homepage

MooTools 1.2 Beta 2 Released

Tagged:  

MooTools has released what will likely be the last beta for version 1.2 of their framework. Here's what you'll find in this new release:

1) Documentation - it's said to be almost 5 times more detailed than version 1.

Every class option has now its description, every method has a complete list of arguments along with description, type, and now every functionality comes with a code example -- sometimes more than one. If you want to see it for yourself, here is the temporary link for the 1.2 beta documentation.

2) Element Accessors

Example - working with the href attribute

$(element).set('href', 'http://mad4milk.net'); //setter
$(element).get('href'); //getter



Example - setting the default morph options

$(element).set('morph', {duration: 100, transition: 'quart:out'});

Now when we call the morph method on the element, the default options will be set.

$(element).morph({height: 200, width: 200});



Example - set method now accepts any Object containing any of the settable properties

$(element).set({
    href: 'http://mad4milk.net',
    text: 'mad4milk website',
    morph: {duration: 200, transition: 'quad:out'},
    events: {
        click: function(){
            document.location.href = this.href;
            return false;
        }
    }
});

Element Accessor Public API - you can create a single "special attribute" that will be able to set a multiple attributes of an element. For more info, check out the documentation.

3) Fully redesigned dimension system - it's now much easier to get window or element dimensions, scrolling offsets, visible height or the full scroll height. For more info, check out the documentation.

Read the full announcement for MooTools 1.2 Beta 2

If you're wondering what changes were in MooTools 1.2 Beta 1, read more about it here.

Initial Draft Specification for "OpenAjax Metadata"

Tagged:  

News from the OpenAjax Alliance! The IDE Working Group and Gadgets Task Force have completed an initial draft of the “OpenAjax Metadata Specification". The Metadata spec represents a standard for interoperability across the Ajax toolkits we know and love. Here are the metadata items defined in this first draft version:

  • Ajax widgets - the spec defines two definitions for "widget"
    • UI controls - Some Ajax libraries provide a set of user interface building block components such as combo boxes, menu bars, or charts
    • Mashup components (aka “widgets” and “gadgets”) - Mashup frameworks allow for pre-packaged mini-applications (sometimes called “widgets” or “gadgets”) to be combined together within a composite application (the “mashup”), where the mashup components react to each other intelligently, such as when the user selects an address in one component which causes a different component to display an updated map that shows the given address.
  • Ajax APIs - the spec provides a set of metadata that describes runtime JavaScript APIs (like classes and methods) available for an Ajax library.
  • Ajax libraries - includes metadata fields similar to entries in the OpenAjax Registry

The primary target consumers of OpenAjax Metadata 1.0 are software products. It is expected that these software products will consume and use the metadata to provide enhanced experience for users who building Ajax-powered solutions. In particular:

* Mashup frameworks will use OpenAjax Metadata to use OpenAjax Metadata for widgets, such as the message types that the widget produces and consumes and the customization parameters that the widget supports

* Ajax IDEs will use OpenAjax Metadata to provide the developer with (presumably automatically-generated) API documentation, intelligent code-assist, widget palettes, and widget property editors

The draft specification can be found here.

Click here to read the announcement from the OpenAjax Alliance

Sun acquires MySQL

Tagged:  

It's happened. This morning, Sun Microsystems announced plans to acquire MySQL AB. Reactions have been mixed, including excitement, pride, disbelief and satisfaction, but also anxiety.

Sun has been a leader in the open source community, just look at: Java, OpenSolaris, Open Office / Star Office, GlassFish app server, and the NetBeans IDE for starters. So, it can't be all bad that they've acquired MySQL, right?

The question stirring up some anxiety is: will MySQL’s support for other programming languages and operating systems now be given less attention due to Sun's vested interest in, and success with, Java and Solaris?

Here's the answer from Sun's blog:

Absolutely not. MySQL is still being managed by the same people, and the charter is still the same. There is no need for reducing the set of platforms or languages. It only makes sense for us to continue to support defacto Web development standards like LAMP, as well as emerging ones like Ruby and Eclipse. This deal is about addition, not subtraction.

What does all of this mean for the developer community? Hopefully just some added value to MySQL due to the immediate access to technical, marketing, OSS developer relations it will now have.

Read more about the acquisition over at Kaj Arno's MySQL blog or the press announcement on Sun's website.

Syndicate content