The Official Milescript Forums Forum Index
  Username:   Password:   
   
   http://milescript.org
Home  FAQ  Search  Memberlist  Usergroups  Profile  Register
 Log in to check your private messages
Welcome
Welcome to The Official Milescript Forums.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Why 'CacheClass'...?

 
Post new topic   Reply to topic    The Official Milescript Forums Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
JS



Joined: 16 Oct 2007
Posts: 2

PostPosted: Sat Oct 20, 2007 1:14 pm    Post subject: Why 'CacheClass'...? Reply with quote

So... I have this little question about the mileScript compiler... but before I tell you, I want to say something:
This is the first JavaScript project in which I see that everything uses only one object - the 'ClassCache' object.(except for my own scripts where I use the same technique);

And here is the question:
Will it be good if you include an option in the {user.projectConfig}.xml file which will allow the developer to specify exactly what name should be used for the global object(and class) that stores every property and method(I mean 'ClassCache')?

For example:
I want instead of 'ClassCache', there to be 'system'.

One simple reason:
Imagine a project, a very complex one, in which the *.js files should be include depending on the current conditions.(A graphic library is a very good example - you include for example only the core and the model for the lines, not everything)
By using the same object every time you make it very difficult for the project to be separated on different files that could be include depending on the situation.
Back to top
View user's profile Send private message
Husafan



Joined: 05 Oct 2007
Posts: 2
Location: Atlanta, GA

PostPosted: Sat Oct 20, 2007 2:54 pm    Post subject: ClassCache changes are in the works Reply with quote

JS,

A very good question. Currently, ClassCache is an auto-generated object used to store 'class definition' files, which are then used to create instances of classes at run time. The class definitions in the ClassCache also constitute the object that static attributes are actually added to, rather than adding these attributes to each instance of a class.

Currently, Milescript applications only support static linking. However, in the very near future, you will be able to tell the compiler to 'dynamically' link your project, which means that only the code in the application you are compiling will get generated, along with a dependency file to tell the ClassCache where to find the other classes at runtime.

This means that you will be able to host your application code on your web server, but have the client browser load any libraries you might need from any other URL. At runtime, all of these libraries are put into the ClassCache so that they can interact together without interfering with the root javascript namespace.

One of the features we are currently working on implementing is obfuscation/code-compression. This feature will also allow the developer to change the name of the ClassCache. However, this is a fairly complicated step, since we have to make sure that you will be able to load and link against an obfuscated third-party library at runtime, and still have everything function as intended.


In the coming weeks, we will be planning out a road map, with dates, to let you all know when you can expect features to be added, but rest assured for now that you will soon be able to modify the name of ClassCache. Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    The Official Milescript Forums Forum Index -> Wish List All times are GMT - 5 Hours
Page 1 of 1   

 
Jump to:    
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Chest


phpBB skin developed by: John Olson
Powered by phpBB
Hosted by FreeForums.org