While APEX ships with some built in javascript functionality, and very nice javascript functionality if I say so myself ;). We are definitely not everything to everybody, which is on purpose.
There are so many very good 3rd javascript libraries , and we love our 3rd party javascript libraries , out there (extjs , YUI , DOJO and many more) that we don't want to be making that choice for developers since the proper choice can be different all the way from the image directory level to the workspace , application and even page by page level.
In fact sometimes I feel bad , well not that bad ;), for forcing even our library on developers. In 3.1 our library can be turned on and off on a page by page basis.
But I digress, if you have filesystem access integrating in a 3rd party library is as easy as any other web page you just include in your path.
But if you are in a hosted environment, you need to pick a library or build of a library that is all in one file.
jQuery is a good example of a 1 file library that can be easily integrated into APEX using #WORKSPACE_IMAGES# or #APP_IMAGES# . And I've created a very simple example here to show that it works , http://apex.oracle.com/pls/otn/f?p=11933:151
I'm going to be looking into different ways of including in other libraries that require a directory structure when you don't have file system access, I think XDB might be helpful here, but if someone has already solved this particular problem please comment or blog about it as it will be very helpful to quite a few people.
Subscribe to:
Post Comments (Atom)
I love jQuery! It's your fault too... In fact I've been thinking about creating a site with some tutorials for integrating jQuery with ApEx as there are some tricks.
Dan
Yeah jQuery is my favorite as well, when it comes to building real complex functionality I'd rather build to spec than use a library, though I must admit lately I've seen some very nice stuff with extjs.
>> integrating jQuery with ApEx as there are some tricks.
Go for it. Examples like that will be useful to lots of people.
FYI - I'll be putting up a demo Apex Site integrating extjs early next year.
Mark
My favorite is prototype.js!
You said that in 3.1 the APEX library can be turned on and off on a page by page basis. This is very nice, because if you choose another framework, you don't want to include unnecessary scripts.
However, excluding the APEX javascripts can break some very important functions, for instance:
doSubmit, first_field, init_htmlPPRReport.
This means you have to include these functions in your own javascripts!!!
Guido
This means you have to include these functions in your own javascripts!!!
>>
It sure does.
This is more a feature for mobile applications to bring down the page weight. And most mobile apps I've seen only use doSubmit.
But there is a certain subset of people that would just like to use say extjs in their applications and not our js and yes they will have to rewrite or cut and paste any of the js we emit into their own library.
It's not and can't be a automated process but if that's the direction you want to go it's something you only have to do once.
Heck you could even write say a prototype + apex plugin for people to share if you wanted ;)
Carl
the only drawback with #WORKSPACE_IMAGES# and #APP_IMAGES# is that it doesn't get cached by the browser. So each page request will transmit the hole file again. A caching option for the "Static Files" in the Shared Components would be nice :-)
About lazy loading with the #WORKSPACE_IMAGES#. I could think about a mod_rewrite rule which translates the additional file request of the JS library into a valid request for APEX.
Patrick
Hopefully.
Daniel
I like jQuery too. The $(document).ready() is one highlight, which provides access to the DOM as soon as the DOM is ready (not waiting for the entire page to load as with the traditional onload event). This is nice when you are doing conditional rendering and other stuff on page load, in that it reduces the amount of page flicker you get.
Also, the fairly newly released jQuery UI library is, although not yet as established as others, pretty good and I've found very easy to use. I recently did a test creating some drag and drop functionality and an accordion component, and it really was fairly painless.
I think this area could be huge for APEX. From the tests I did, the trick is obviously to get the APEX engine to generate HTML that plays nicely with the libraries (through customising templates for example). Thus leveraging the rapid, declarative, database-centric architecture of APEX that we all love, and the richness and increased responsiveness that further improve the user experience offered by these libraries.
Good times ahead!
Anthony.
src="="#IMAGE_PREFIX#javascript/date_validation.js" type="text/javascript",
hardcoding "/i/", even pasting the locating in the browser after /apex
Nothing seems to work. Any help would be appreciated! Thanks!