On Tue, Feb 11, 2014 at 9:07 PM, Ruchira Wageesha <[email protected]> wrote:

> Yes. Registering functions for URL patterns is also included. But it will
> be implemented as a separate Jaggery module for routing. i.e. If someone
> wants that functionality, he will have to register his paths using that
> module during the app deployment.
>

+1


>
>
> On Tue, Feb 11, 2014 at 10:18 PM, Nuwan Bandara <[email protected]> wrote:
>
>> +1, This is an optional method. Jaggery will support the resource aspect
>> as a first class citizen. However when writing applications we need a
>> stronger routing mechanism this method will serve that purpose IMO. Also
>> can we register a function for a URL pattern ? is that part of the proposal.
>>
>>
>>
>>
>> On Tue, Feb 11, 2014 at 3:59 AM, Chan <[email protected]> wrote:
>>
>>> I am +1 to even removing the resource aspect from jaggery conf routing.
>>> We need to encourage people to write the routes with in the app rather than
>>> outside of the app (kinda of how node works). This method is much more
>>> preferable compared to JSP way of routing (web.xml).
>>>
>>>
>>> On Mon, Feb 10, 2014 at 10:23 AM, Madhuka Udantha <[email protected]>wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> We will have default mode(current way) and it want violate "resource"
>>>> aspect as it was.
>>>>
>>>> With proposed architecture routing can be taken out from jaggery core.
>>>>
>>>> When you define your routing module in the application.serve() It will
>>>> not violate "resource" aspect.
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>> On Fri, Feb 7, 2014 at 6:03 PM, Samisa Abeysinghe <[email protected]>wrote:
>>>>
>>>>> Does this not violate "resource" aspect?
>>>>>
>>>>>  Thanks,
>>>>> Samisa...
>>>>>
>>>>>
>>>>> Samisa Abeysinghe
>>>>>
>>>>> Vice President Developer Evangelism
>>>>>
>>>>> WSO2 Inc.
>>>>> http://wso2.com
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 7, 2014 at 5:49 PM, Madhuka Udantha <[email protected]>wrote:
>>>>>
>>>>>> In jaggery web request can be served by from .jag/.js (File). We have
>>>>>> noticed It is important to serve web request from the JS function rather
>>>>>> resource file such as (*.jag).
>>>>>>
>>>>>>
>>>>>>
>>>>>> *Use case*
>>>>>>
>>>>>>
>>>>>>
>>>>>> - User go to (send web request to) http://10.100.1.112:9763/testapp/
>>>>>>
>>>>>> - Jaggery will check URL mapping that is define in jaggery.conf[2] in
>>>>>> 'testapp' and get resource path (jaggery file) to server.
>>>>>>
>>>>>> eg: Here is sample url mapping configuration in current jaggery.
>>>>>>
>>>>>>
>>>>>>
>>>>>> *"urlMappings" : [*
>>>>>>
>>>>>> *                          {*
>>>>>>
>>>>>> *                                "url" : "/foo/*",*
>>>>>>
>>>>>> *                                "path" : "foo/index.jag"*
>>>>>>
>>>>>> *                          },*
>>>>>>
>>>>>> *                          {*
>>>>>>
>>>>>> *                                 "url" : "/bar/test/",*
>>>>>>
>>>>>> *                                 "path" : "/private.jag"*
>>>>>>
>>>>>> *                          }*
>>>>>>
>>>>>> *                ],*
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *Problem*
>>>>>>
>>>>>>
>>>>>>    - If jaggery application developer need to serve his/her user web
>>>>>>    request from function rather from file.
>>>>>>    - (With currently jaggery is not possible achieve this)
>>>>>>
>>>>>>
>>>>>>
>>>>>> *Solution*
>>>>>>
>>>>>>
>>>>>>    - We will introduce new function for global scope of the
>>>>>>    application, such as called application.serve(Function function)
>>>>>>    - If application.serve defined in 'initScripts' for jaggery
>>>>>>    application all the request that coming to that application will be 
>>>>>> served
>>>>>>    by that function.
>>>>>>    - If application.serve is not defined in 'initScripts'. It will
>>>>>>    work as current way by looking on "urlMappings"
>>>>>>    - Therefore this change will not effect for existing jaggery
>>>>>>    application/application deployment also.
>>>>>>    - Routing logic (Can be used 3rd party) can be implemented in
>>>>>>    this function and this will be much user friendly for jaggery 
>>>>>> developers.
>>>>>>
>>>>>>
>>>>>>
>>>>>> *[NOTE]*
>>>>>>
>>>>>>
>>>>>>    - Since this solution used application[1](Global scope). We will
>>>>>>    have to fixed thread safety[3] in jaggery for global scope.
>>>>>>    - This solution will help full for front end controller concept
>>>>>>    and improving REST service APIS in jaggery.
>>>>>>
>>>>>> [1] http://jaggeryjs.org/apidocs/application.jag
>>>>>>
>>>>>> [2] http://jaggeryjs.org/apidocs/jagconf.jag
>>>>>>
>>>>>> [3]
>>>>>> http://madhukaudantha.blogspot.com/2014/02/introducing-sync-for-jaggery-javascript.html
>>>>>>
>>>>>> --
>>>>>> *Madhuka* Udantha
>>>>>> Senior Software Engineer
>>>>>> Development Technologies
>>>>>> WSO2 Inc. : http://wso2.com
>>>>>>
>>>>>> *Mobile*: +94774066336
>>>>>> *Blog*: http://madhukaudantha.blogspot.com/
>>>>>>
>>>>>> _______________________________________________
>>>>>> Architecture mailing list
>>>>>> [email protected]
>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Architecture mailing list
>>>>> [email protected]
>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Madhuka* Udantha
>>>> Senior Software Engineer
>>>> Development Technologies
>>>> WSO2 Inc. : http://wso2.com
>>>>
>>>> *Mobile*: +94774066336
>>>> *Blog*: http://madhukaudantha.blogspot.com/
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> [email protected]
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>> Chan (Dulitha Wijewantha)
>>> Software Engineer - Mobile Development
>>>  WSO2Mobile
>>> Lean.Enterprise.Mobileware
>>>  * ~Email       [email protected] <[email protected]>*
>>> *  ~Mobile     +94712112165 <%2B94712112165>*
>>>
>>> *  ~Website   dulithawijewantha.com <http://dulithawijewantha.com/> *
>>>
>>> *  ~Blog         blog.dulithawijewantha.com
>>> <http://dulichan.github.io/chan/>*
>>> *  ~Twitter     @dulitharw <https://twitter.com/dulitharw>*
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>>
>>
>>
>> *Thanks & Regards,Nuwan BandaraTechnical Lead; **WSO2 Inc. *
>> *lean . enterprise . middleware |  http://wso2.com <http://wso2.com> *
>>
>> *blog : http://nuwanbando.com <http://nuwanbando.com>; email:
>> [email protected] <[email protected]>; phone: +1 812 606 7390
>> <%2B1%20812%20606%207390> *
>> <http://www.nuwanbando.com/>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
>
> *Ruchira Wageesha**Associate Technical Lead*
> *WSO2 Inc. - lean . enterprise . middleware |  wso2.com <http://wso2.com>*
>
> *email: [email protected] <[email protected]>,   blog:
> ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>,
> mobile: +94 77 5493444 <%2B94%2077%205493444>*
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 



*Thanks & Regards,Nuwan BandaraTechnical Lead; **WSO2 Inc. *
*lean . enterprise . middleware |  http://wso2.com <http://wso2.com> *

*blog : http://nuwanbando.com <http://nuwanbando.com>; email:
[email protected] <[email protected]>; phone: +1 812 606 7390 *
<http://www.nuwanbando.com/>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to