JavascriptMVC used in Salesforce.com

30 views
Skip to first unread message

creemej

unread,
Oct 6, 2010, 5:52:49 AM10/6/10
to JavaScriptMVC, jan.cr...@sjamayee.be
Hi,

Is it possible to use jmvc in the Salesforce cloud.
For the moment I use one js-file with all javascript classes.
I am missing the mvc-framework for the moment.
I am a bit confused by the jvmc- structure
(apps,controllers,models,views,...).
In production, it will be compressed into one file: production.js.
But how should it work in development mode, with all the different js-
files?
Are there examples of usage within salesforce?

thanks,

Jan

Justin Meyer

unread,
Oct 6, 2010, 5:59:32 AM10/6/10
to javasc...@googlegroups.com
Jan,
  JavaScriptMVC can be used anywhere you can upload JS files to.  I don't think there are any examples of use with salesforce, and I'm not familiar with the salesforce cloud.  However, I'd start by learning 2.0's include (3.0's steal) to learn how to require multiple files.

Justin Meyer

Jupiter Consulting
\Development\Training\Support
847-924-6039
justin...@gmail.com



--
You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
To post to this group, send email to javasc...@googlegroups.com.
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.


creemej

unread,
Oct 6, 2010, 6:41:26 AM10/6/10
to JavaScriptMVC
Justin,

Thanks for the quick reaction.
I did already take a look at the include.

include('../../someFolder/somefile') and include.models('task') work
from the js-file.

For the moment, all includes are one the salesforce-page, like this:
<apex:includeScript value="{!$Resource.sjamayee_js}"/>
<apex:stylesheet value="{!$Resource.sjamayee_css}"/>

So, I think that I have to replace these apex-includes, but I am still
confused.

Maybe, when I create a jmvc-structure on salesforce, I will see the
impact.
But, its not as simple as that.

Development < > Production

I will investigate it, but I sure need some help and vision ...




On 6 okt, 11:59, Justin Meyer <justinbme...@gmail.com> wrote:
> Jan,
>   JavaScriptMVC can be used anywhere you can upload JS files to.  I don't
> think there are any examples of use with salesforce, and I'm not familiar
> with the salesforce cloud.  However, I'd start by learning 2.0's include
> (3.0's steal) to learn how to require multiple files.
>
> Justin Meyer
>
> Jupiter Consulting
> \Development\Training\Support
> 847-924-6039
> justinbme...@gmail.com
>
> On Wed, Oct 6, 2010 at 4:52 AM, creemej <cree...@gmail.com> wrote:
> > Hi,
>
> > Is it possible to use jmvc in the Salesforce cloud.
> > For the moment I use one js-file with all javascript classes.
> > I am missing the mvc-framework for the moment.
> > I am a bit confused by the jvmc- structure
> > (apps,controllers,models,views,...).
> > In production, it will be compressed into one file: production.js.
> > But how should it work in development mode, with all the different js-
> > files?
> > Are there examples of usage within salesforce?
>
> > thanks,
>
> > Jan
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "JavaScriptMVC" group.
> > To post to this group, send email to javasc...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > javascriptmv...@googlegroups.com<javascriptmvc%2Bunsu...@googlegroups.com>
> > .

creemej

unread,
Oct 6, 2010, 6:52:24 AM10/6/10
to JavaScriptMVC
Maybe it's that simple.

The complete jmvc-structure is hidden for the apex/sf-page.

On the page there is only one include like:
<apex:includeScript value="{!$Resource.sjamayeeMVC_js}"/>

In the js-file I need to include all different elements (js,css,other
resources) from the salesforce platform (static resources).

No, for the moment I do not see the structure.

creemej

unread,
Oct 6, 2010, 7:41:30 AM10/6/10
to JavaScriptMVC
Not that simple!

Salesforce uses a flat static-resources (without subfolders).

Because of this, I need to flatten the jmvc-structure and/or create
unique element-names.

Am I blind?

Justin Meyer

unread,
Oct 6, 2010, 7:50:21 AM10/6/10
to javasc...@googlegroups.com
You can't add folders?  I don't think you can use steal or include without making changes.  Both steal and include expect to be in a folder.

Is it possible to develop locally, with folders and then, when you push out to salesforce, you only move the production file?



Justin Meyer

Jupiter Consulting
\Development\Training\Support
847-924-6039
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
Message has been deleted

creemej

unread,
Oct 6, 2010, 3:10:31 PM10/6/10
to JavaScriptMVC
I have also been thinking on that, but it's not a possibility.

I think that local development is not possible.
The sf-page has to be an <apex:page>.

I can do almost everything in salesforce, but here I think is a limit.
The sf-framework does not allow it!

FINAL: NOT POSSIBLE!

On 6 okt, 13:50, Justin Meyer <justinbme...@gmail.com> wrote:
> You can't add folders?  I don't think you can use steal or include without
> making changes.  Both steal and include expect to be in a folder.
>
> Is it possible to develop locally, with folders and then, when you push out
> to salesforce, you only move the production file?
>
> Justin Meyer
>
> Jupiter Consulting
> \Development\Training\Support
> 847-924-6039
> justinbme...@gmail.com
> > <javascriptmvc%2Bunsu...@googlegroups.com<javascriptmvc%252Buns...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages