Login   Register  
Icontem

The JSClasses site is launched! - JS Classes blog

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Blog JS Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog The JSClasses site is...   Post a comment Post a comment   See comments See comments (4)   Trackbacks (0)  
>> Next: New Object alerts and...

Author: Manuel Lemos

Posted on:

Categories: Site features

JSClasses is finally launched. This is the initial kick off post. It talks about what is the purpose of the site for those that are not familiar with the concept, why it was launched, who is this useful to and how you can contribute to it.




Contents

What is this site?

Why was this site launched?

To whom is this site useful?

Ready to use packages for all purposes

Why in this site and not in another project hosting site?

Keeping track of the users that download packages

Notify users when a package is updated

Communicate with users using a blog for each package

Provide support to users using a forum for each package

Give special exposure to top ranked packages

Why does it require the users to be registered to download?

Lately in JavaScript podcast and other features

So, how can you contribute?

Submitting packages of JavaScript objects

Submitting reviews of books and products for JavaScript developers

Submit your local JavaScript user group

Spreading the word


What is this site?

JSClasses logoThe JSClasses site is a repository for distribution of freely available of JavaScript components.

It is derived from the PHPClasses Repository site. That is another repository site for PHP components.

It is meant for distributing only Object Oriented Programming components. In PHP OOP is achieved using classes of objects, thus the name PHP Classes.

In JavaScript there is not exactly the concept of classes. In JavaScript you do not create objects instantiating classes. You just call a constructor function using the new operator. You can define the JavaScript constructor function in a way that looks like PHP classes, but it is a little different.

Probably, it would be more accurate to call this site JSObjects. However, the name JSClasses was preferred just to be more consistent with the PHPClasses site name.

On the other hand, some PHPClasses site users assume that the Classes part of the name came from teaching classes. It is true that many users have learned a lot from the PHPClasses site. However, that was not the original meaning of the PHP Classes name.

Why was this site launched?

JavaScript is a very popular language thanks mostly to the Web being so successful as a platform.

Many developers of PHP and other Web programming languages need to use JavaScript components to provide enhanced functionality to the sites that they develop.

Many PHP developers submit packages to the PHPClasses site that include JavaScript code. Some even submit packages with only JavaScript code, but that is not acceptable because the PHPClasses site is only for distributing components that provide the described functionality using PHP code.

Therefore, launching a JavaScript components repository was the next logical step. Hopefully it will address needs of many users that develop Web sites and applications or other software that uses JavaScript code.

To whom is this site useful?

Ready to use packages for all purposes

Evidently, all users that develop JavaScript applications may find this site very useful. Providing them ready to use components will help them developing their applications faster, using eventually more reliable code that was tested by many other users.

The success of the PHPClasses site lead to the fact that over time it accumulated a large collection of components for practically all purposes the language code could be used for.

It is really amazing the number of components that you can find there for purposes that many of us could not even imagine. The PHPClasses site embraces the long tail of the PHP applications. The same is the expected for the JSClasses site.

Why in this site and not in another project hosting site?

To use code of other developers from this site, first they have to submit it here. But now you may wonder: why JavaScript developers would be willing to submit their code to this site when there are many other sites out there for distributing their work?

To answer that question it is necessary to explain the benefits that the JSClasses site provides to developers that publish their components here.

First, keep in mind that the JSClasses site is not really meant to replace nor to compete with project hosting sites such as SourceForge, GitHub, GoogleCode, CodePlex, etc.. Those sites are meant to help developers to develop their projects eventually in collaboration with other developers.

They provide nice features such as version control systems that allow developers to keep the history of all version of their code files. If you do not have already your own version control system to maintain your projects, you are recommended to use those sites too.

Those sites are not seen as competing alternatives to the JSClasses sites but rather as a solution to host the projects during their development.

The purpose of the JSClasses site is to provide greater exposure to the projects of JavaScript developers that submit them here for redistribution with a set of unique features that provide authors special benefits that they hardly can get elsewhere.

Keeping track of the users that download packages

The main site feature that benefit authors that submit their packages here is that the site can track the users that view or download the published packages.

Notify users when a package is updated

The user tracking feature allows implementing other features that are valuable to authors. One of those features is the ability to automatically notify users when a package that they previously downloaded was updated. The site sends alert messages to the users of each package.

This is good because users tend to forget to regularly check if the packages that they use were updated. That is because their lives do not revolve around the development of third-party packages that they use.

This site helps them to remember of packages they have downloaded and are eventually using. This way they can immediately upgrade when important bugs were fixed or new useful features were implemented.

This is also good for authors that do not have to keep providing support to old packages that were updated, as their users are immediately notified to upgrade.

Communicate with users using a blog for each package

Each package published in the site gets a blog of its own. The authors can post any interesting articles about their packages. The site automatically sends an e-mail alert to all users that have previously downloaded a package when a new post is published in the respective package blog.

This is useful for authors to keep their users up to date with new package features, let users know better about how to use certain features, or even let authors ask users for feedback about the present or future features of the packages.

Provide support to users using a forum for each package

Users can also communicate with authors easily to ask for support regarding the use of their packages. The site provides a dedicated forum for each package on which users can ask for help, report bugs, request features, thank the authors or give their opinion about a package.

Authors may reply to forum posts. When they do that the site may notify automatically by e-mail the users that have posted in the forum, so they can see the replies and get immediate support as they wish.

Give special exposure to top ranked packages

Another interesting feature derived from the fact that the site keeps track of the users that view or download each package is the ability to produce several types of rankings. Those rankings provide special exposure to packages that excel in different aspects.

One of such rankings is for the most downloaded packages. Every day the site computes the total number of distinct users that downloaded each package. With that number it can computer the ranking of the most downloaded packages during the previous week or during all time.

The site can also compute a ranking of authors that had more distinct users downloading all their packages. This is specially good to encourage authors to submit more and better packages.

There are other interesting rankings updated every day like the top rated packages which is based on user ratings of packages in different aspects, the top reviewers which is based on the users that rated more packages accurately, the most reused packages and their authors which is based on the number of packages that reused other packages.

The ranking positions appear updated every day on the author or package pages. The top ranked authors and packages in each of these rankings appear listed in the Top 10 charts page.

The good thing about these rankings and top charts is that they provide public recognition to the authors that publish the best packages in this site.

Evidently the ego boosting factor implied by this aspect of the site is a powerful motivator that definitely contributed for the popularity of the PHPClasses site and certainly will make JSClasses  equally popular among the community of JavaScript developers around the world.

Why does it require the users to be registered to download?

All these features are fine but they can only be implemented if the site can identify each user that is viewing or downloading a package. Therefore the authors have an option to require that only registered users download their packages.

An author is free to turn off the requirement to register and users are allowed to download without having to be logged. However, the site does not keep track of accesses done by anonymous users.

Therefore, in this case it is not possible notify anonymous users when a package is updated, nor when a new package blog post is published, nor downloads done by anonymous users count to the top rankings.

Basically, turning off the registration requirement, authors loose most of the benefits that they could take from publishing their packages in this site. That is why most authors keep the registration requirement.

Sometimes users complain for having to register with yet another site to access to the freely distributable code available in this site. That is an understandable annoyance but I hope by now you reckon the benefits of that requirement. After all you register once and that is it.

If keeping the registration requirement is what it takes to provide benefits to the authors in order to keep them motivated to submit more and betters packages for the benefit for all of us, so be it.

Anyway, if you are already a PHPClasses site user, you do not have to register in this site again. Both sites share the same single sign-on system that lets you reuse the same account credentials in both sites.

Lately in JavaScript podcast and other features

The JSClasses site also provide other features like those made available by the PHPClasses site besides those mentioned above. One those features is a monthly podcast on which we will be talking what is going on lately in the JavaScript world.

This is a podcast hosted by myself (Manuel Lemos) and Michael Kimsal from WebDev Publishing, publisher of the appreciated JSMag and GroovyMag magazines and organizer of the IndieConf event.

It will be a monthly podcast with a format similar to the Lately In PHP podcast. Episodes will be published right in this blog of the JSClasses site. Just use the links at the top of this post to subscribe to the blog RSS feed in order to keep track of new episodes.

In the next days a new episode of the Lately in PHP podcast will be published dedicated to the JSClasses site. You may want to checkout the PHPClasses blog too to listen to that episode once it is published.

Other than that, there are other features of the PHPClasses site that will not yet be available in the JSClasses site. They will be launched later as time permits. From those features I would just would like to give an overview, so you can count on what is coming later.

The Professionals directory lets users sign-up to announce they are available for hiring. The Jobs section lets companies post jobs for available professionals. The Premium subscriptions will provide users better site services upon payment of a subscription fee.

The Programming Innovation Award is an initiative that will distinguish authors that submit innovative components. This one will take some time to be launched in the JSClasses site, because the site is just starting, so everything is innovative. Maybe in two years when there are already many submitted components, the site will start distiguishing innovative authors.

So, how can you contribute?

You can contribute to the site in many ways. Let me review the most important things you can do to contribute.

Submitting packages of JavaScript objects

If you have already have your own packages of JavaScript objects, you can submit them for publishing in the site by logging in and clicking on a link titled Contribute that appears at the top of all pages of the site.

It leads to a page on which you are presented with the contribution rules. It is a bit long page but it is simple. It is recommended that you fully read it at least once, so you an have your package admitted and published sooner rather than later.

Keep in mind this is a repository for JavaScript Object Oriented Programming components. So, if you provide some global code that calls existing object libraries that is not acceptable. Global code that just redefines prototypes of existing objects is also not acceptable.

The described functionality must be provided by your own JavaScript objects, even if those objects call third party objects.

The reason why only objects are accepted in this site, but scripts made only of global code is the same as in PHPClasses. Objects encapsulate functionality in such way that it can be reused by many projects without risking to clashing variable or function names when using multiple libraries from distinct sources.

In case of doubt what exactly is an acceptable JavaScript object, take a look at the already admitted packages to see how you should structure your code. Here follows an example of how your "class" definition could look like in JavaScript:

classFunction = Function()
{
var somePrivateVariable = 'some_value'

var somePrivateFunction = function(/* parameters */)
{
/* some code */
}

this.somePublicVariable = 'some_value'

this.somePublicFunction = function(/* parameters */)
{
somePrivateFunction();
}
}

Then the code of the script using the "class" object could be like this:

myObject = new classFunction();

If you want to go further an even use a sort of namespace emulation in JavaScript, your "class" code could look like this:

if(typeof(MyUniqueNamespace) === 'undefined')
MyUniqueNamespace = { }

if(typeof(MyUniqueNamespace.utilities) === 'undefined')
MyUniqueNamespace.utilities = { }

MyUniqueNamespace.utilities.classFunction = Function()
{
var somePrivateVariable = 'some_value'

var somePrivateFunction = function(/* parameters */)
{
/* some code */
}

this.somePublicVariable = 'some_value'

this.somePublicFunction = function(/* parameters */)
{
somePrivateFunction();
}
}

Then the code of the script using the "class" object could be like this:

myObject = new MyUniqueNamespace.utilities.classFunction();

Submitting reviews of books and products for JavaScript developers

The JSClasses site also has a Reviews section on which it lists some books and products of interest for JavaScript developers.

You can submit reviews to let other users know about appreciated books or products that they may also be interested. Just go on the page of the book or product that you want to review and click on the Submit your review link.

If you want to review a book or product that is not yet listed there, just click on the Contact link at the bottom of all pages and send a message to the site telling which books or products you would like to review, so I can add them to the listings.

Submit your local JavaScript user group

The JSClasses site also has a directory to list local JavaScript user groups. If you have a JavaScript user group, the JSClasses can help you getting more members.

Every time an user logs in, the site asks him about his country. Then the site shows a map with user groups of his country and invites him to join a local user group.

This initiative was implemented in the PHPClasses site many years ago and it help many local PHP user groups to grow and keep interesting activities that benefit local PHP professionals. Over 220 PHP user groups from everywhere in the world were added to the directory.

The idea is to foster local JavaScript user groups in the same way. The more you help your local JavaScript communities to organize and grow, the greater are the chances of getting help from your local JavaScript developer colleagues.

If do not have a local JavaScript group, try founding one. You can start by creating a page for your user group in a site of yours, or create a JavaScript group at Meetup, Yahoo! Groups, Google Groups, etc..

The JSClasses site has means to verify whether a group is still active and will list JavaScript user groups of a country sorted by activity and popularity. For that it encourages the users of the site to tell which groups they take part. The groups with more active users are listed first. That helps you finding a group that is made of active people that is more willing to help you.

Spreading the word

If you are not ready to submit any JavaScript packages, reviews or user groups, that is OK. You can still help a lot by spreading the word about this site.

You can do that by e-mail your friends and developer colleagues, post a note on Twitter using the Twitter button at the top of this page, or post in your favorite social network.

You can also encourage others the @JSClasses Twitter account to keep up with the latest content published in the site. If you want to keep up with the special news about the JSClasses site and JavaScript world in general before they are widely announced, you may want to follow the @JSClassesearly Twitter account. 

The PHP users were the ones that made the PHPClasses site popular. Likewise it is up to the JavaScript users to help making the JSClasses site at least equally popular. It is in your hands. Spread the word.

If you have questions of comments, feel free to post a comment to this article here.


Login to Post a Comment

Login Immediately with your account on:

Facebook ConnectGmail or other Google Account
Hotmail or Microsoft Windows LiveStackOverflow
GitHubYahoo


Comments:

1. small bug - ZaraWebFX (2010-09-07 22:54)
var MyUniqueNamespace.utilities = { } //well... almost... - 3 replies
Read the whole comment and replies


>> Next: New Object alerts and...

  Blog JS Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog The JSClasses site is...   Post a comment Post a comment   See comments See comments (4)   Trackbacks (0)