Hi,
It's probably a stupid question but how do you guys organize your code in Amber? I've started the ./bin/server and created a package with a bunch of classes. My code is saved but is in the middle of all the existing classes. Is there a way to separate my code from the core classes ? If not, how do you upgrade amber ? Cheers, Francois -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
François Stephany wrote:
> Hi, Hi, > It's probably a stupid question but how do you guys organize your code in Amber? > > I've started the ./bin/server and created a package with a bunch of > classes. My code is saved but is in the middle of all the existing > classes. Is there a way to separate my code from the core classes ? If > not, how do you upgrade amber ? The loader now allows to load packages (and save them, partially) to different place then is the amber itself. Portion of the page I am working on: <script src="//assets.foo.biz/amber/js/amber.js"></script> <script> // ... loadAmber({ // ... packages: [ "//assets.foo.biz/trapped/Trapped-Backend", "//assets.foo.biz/trapped/Trapped-Frontend", "//assets.foo.biz/foo/foo-Lib", "Foo-Model", "Foo-Client" ], packageHome: "code/", // ... }); Here, I have some dependencies in assets.foo.biz (amber, trapped and foo folders), first two included simply as git submodules. The packages I work on are Foo-Model and Foo-Client. They are loaded (and saved) into folder code (relative to the starting folder of server). Bottom line is, use packageHome to say where to load packages without path (the ones you work on), and load anything other with including path (either local absolute or relative (to packageHome), or in the form of URL as shown above (//machine/path is also url, just reusing protocol so is is always http or https the same as the main page is)). Packages that you <del>save</del>commit go always to packageHome. > Cheers, > Francois Hope this helped, Herby -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Herby Vojčík wrote: > François Stephany wrote: >> Hi, > Hi, > >> It's probably a stupid question but how do you guys organize your code >> in Amber? >> >> I've started the ./bin/server and created a package with a bunch of >> classes. My code is saved but is in the middle of all the existing >> classes. Is there a way to separate my code from the core classes ? If >> not, how do you upgrade amber ? > > The loader now allows to load packages (and save them, partially) to > different place then is the amber itself. > > Portion of the page I am working on: > > <script src="//assets.foo.biz/amber/js/amber.js"></script> > <script> > // ... > loadAmber({ > // ... > packages: [ > "//assets.foo.biz/trapped/Trapped-Backend", > "//assets.foo.biz/trapped/Trapped-Frontend", > "//assets.foo.biz/foo/foo-Lib", > "Foo-Model", > "Foo-Client" > ], > packageHome: "code/", > // ... > }); > > Here, I have some dependencies in assets.foo.biz (amber, trapped and foo > folders), first two included simply as git submodules. Sorry for misinformation. > > The packages I work on are Foo-Model and Foo-Client. They are loaded > (and saved) into folder code (relative to the starting folder of server). > > Bottom line is, use packageHome to say where to load packages without > path (the ones you work on), and load anything other with including path > (either local absolute or relative (to packageHome), or in the form of > URL as shown above (//machine/path is also url, just reusing protocol so > is is always http or https the same as the main page is)). Do not include 'js' in paths, it is included automatically as last part of path. > Packages that you <del>save</del>commit go always to packageHome. > >> Cheers, >> Francois > > Hope this helped, > Herby > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Thanks a lot Herby, I'll give it a try :)
On Wed, Feb 27, 2013 at 11:31 AM, Herby Vojčík <[hidden email]> wrote: > > > Herby Vojčík wrote: >> >> François Stephany wrote: >>> >>> Hi, >> >> Hi, >> >>> It's probably a stupid question but how do you guys organize your code >>> in Amber? >>> >>> I've started the ./bin/server and created a package with a bunch of >>> classes. My code is saved but is in the middle of all the existing >>> classes. Is there a way to separate my code from the core classes ? If >>> not, how do you upgrade amber ? >> >> >> The loader now allows to load packages (and save them, partially) to >> different place then is the amber itself. >> >> Portion of the page I am working on: >> >> <script src="//assets.foo.biz/amber/js/amber.js"></script> >> <script> >> // ... >> loadAmber({ >> // ... >> packages: [ >> "//assets.foo.biz/trapped/Trapped-Backend", >> "//assets.foo.biz/trapped/Trapped-Frontend", >> "//assets.foo.biz/foo/foo-Lib", >> "Foo-Model", >> "Foo-Client" >> ], >> packageHome: "code/", >> // ... >> }); >> >> Here, I have some dependencies in assets.foo.biz (amber, trapped and foo >> folders), first two included simply as git submodules. > > Not true here, I select only some subfolders, during jenkins deploy job. > Sorry for misinformation. > >> >> The packages I work on are Foo-Model and Foo-Client. They are loaded >> (and saved) into folder code (relative to the starting folder of server). >> >> Bottom line is, use packageHome to say where to load packages without >> path (the ones you work on), and load anything other with including path >> (either local absolute or relative (to packageHome), or in the form of >> URL as shown above (//machine/path is also url, just reusing protocol so >> is is always http or https the same as the main page is)). > > Do not include 'js' in paths, it is included automatically as last part of > path. > > >> Packages that you <del>save</del>commit go always to packageHome. >> >>> Cheers, >>> Francois >> >> >> Hope this helped, >> Herby >> > > -- > You received this message because you are subscribed to the Google Groups > "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [hidden email]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by fstephany
I've seen the suggestion I want to try to make a git submodule for
amber and then make softlinks into that or plain references from your html/js/css. Then you can update it and commit the updated pointer when you see your own tests still pass On Tue, Feb 26, 2013 at 3:21 PM, François Stephany <[hidden email]> wrote: > Hi, > > It's probably a stupid question but how do you guys organize your code in Amber? > > I've started the ./bin/server and created a package with a bunch of > classes. My code is saved but is in the middle of all the existing > classes. Is there a way to separate my code from the core classes ? If > not, how do you upgrade amber ? > > Cheers, > Francois > > -- > You received this message because you are subscribed to the Google Groups "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Brad Midgley -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |