Tapestry vs Spring MVC + REST + Angular

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Tapestry vs Spring MVC + REST + Angular

Qbyte Consulting
After years of Tapestry focus I finally got around to checking out how
others are building web apps these days. Spring MVC + REST and Angular seem
to be flavours of the day and can create some quite slick solutions. These
approaches are still full of boilerplate code, but things are looking a lot
better than the early days of Struts.

So far as I can see Tapestry and maybe GWT are still the only one stop shop
for cutting out the boiler plate code and having a focus on domain driven
design with components instead of these pattern centric low level
approaches.
Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

JumpStart
Totally agree.

Most recently I’ve built an extensive tablet app using T5.4 + PhoneGap.

It’s massively AJAX, but I didn’t have to think about it very much - thanks to Zones.

It employs only 5 pages instead of a few hundred - thanks to components and Zones. SPA without pain!

The small amount of custom JavaScript is done as components and is beautiful (I'd never before thought that possible) - thanks to T5.4 using RequireJS.

It runs so fast - fast enough to fool most into believing it is a native app - thanks to Zones, RequireJS, and T5.4’s asset handling (and AWS)!

But most of all, it has been a joy to build, and it has let me focus on the domain most of the time, which I can’t say is true of any other framework I’ve used (not even GWT).

Tapestry, and especially Tapestry 5.4, I take my hat off to you.

Geoff

> On 29 Jul 2016, at 8:38 PM, Qbyte Consulting <[hidden email]> wrote:
>
> After years of Tapestry focus I finally got around to checking out how
> others are building web apps these days. Spring MVC + REST and Angular seem
> to be flavours of the day and can create some quite slick solutions. These
> approaches are still full of boilerplate code, but things are looking a lot
> better than the early days of Struts.
>
> So far as I can see Tapestry and maybe GWT are still the only one stop shop
> for cutting out the boiler plate code and having a focus on domain driven
> design with components instead of these pattern centric low level
> approaches.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

Carlos Montero Canabal
Hi Geoff,

Can you tell us how you use Tapestry with PhoneGap? My questions are about how you embed T5 app into PhoneGap system that requires simple html/js. Do you do “Save as” the main IndexPage of Tapestry5 on browser  and put it on PhoneGap project? And deploy the t5 app to manage all the zone updates?

Regards

Carlos Montero

> El 2/8/2016, a las 5:54, JumpStart <[hidden email]> escribió:
>
> Totally agree.
>
> Most recently I’ve built an extensive tablet app using T5.4 + PhoneGap.
>
> It’s massively AJAX, but I didn’t have to think about it very much - thanks to Zones.
>
> It employs only 5 pages instead of a few hundred - thanks to components and Zones. SPA without pain!
>
> The small amount of custom JavaScript is done as components and is beautiful (I'd never before thought that possible) - thanks to T5.4 using RequireJS.
>
> It runs so fast - fast enough to fool most into believing it is a native app - thanks to Zones, RequireJS, and T5.4’s asset handling (and AWS)!
>
> But most of all, it has been a joy to build, and it has let me focus on the domain most of the time, which I can’t say is true of any other framework I’ve used (not even GWT).
>
> Tapestry, and especially Tapestry 5.4, I take my hat off to you.
>
> Geoff
>
>> On 29 Jul 2016, at 8:38 PM, Qbyte Consulting <[hidden email]> wrote:
>>
>> After years of Tapestry focus I finally got around to checking out how
>> others are building web apps these days. Spring MVC + REST and Angular seem
>> to be flavours of the day and can create some quite slick solutions. These
>> approaches are still full of boilerplate code, but things are looking a lot
>> better than the early days of Struts.
>>
>> So far as I can see Tapestry and maybe GWT are still the only one stop shop
>> for cutting out the boiler plate code and having a focus on domain driven
>> design with components instead of these pattern centric low level
>> approaches.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

JumpStart
I should have said Cordova, which refers to the framework and plugins, rather than PhoneGap, which these days is just Adobe’s distribution mechanism and which we no longer use.

In Cordova we have one page - index.html -  and it is very basic. It displays a splash screen. It has some javascript which, on device ready, redirects to the server-side login page. From there on it’s all Tapestry pages served from the server-side. The Tapestry pages can include Cordova plugins to access things like sound, the camera, and the ability to launch other apps.

When you read the code below, keep in mind that we currently target only iOS. I can’t recall why it shows then hides the splashscreen in quick succession. It might be a workaround.

We deploy this simple one page app to Apple’s App Store.

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0 <http://www.apache.org/licenses/LICENSE-2.0>
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
var app = {
    // Application Constructor
    initialize: function() {
        this.bindEvents();
    },
    // Bind Event Listeners
    //
    // Bind any events that are required on startup. Common events are:
    // 'load', 'deviceready', 'offline', and 'online'.
    bindEvents: function() {
        //console.log("> bindEvents - start");
        document.addEventListener('deviceready', this.onDeviceReady, false);
        //console.log("> bindEvents - end");
    },
    // deviceready Event Handler
    //
    // The scope of 'this' is the event. In order to call the 'receivedEvent'
    // function, we must explicity call 'app.receivedEvent(...);'
    onDeviceReady: function() {
        // See http://www.iperform.nl/en/blog/post/cordova-ios-7-statusbar-fix <http://www.iperform.nl/en/blog/post/cordova-ios-7-statusbar-fix>
        StatusBar.overlaysWebView(false);
       
        app.receivedEvent('deviceready');
    },
    receivedEvent: function(id) {
        navigator.splashscreen.show();
        //console.log('Received Event: ' + id);

        navigator.splashscreen.hide();
        location.replace("https://ZZdomainZZ/myapp/login");
    }
};


> On 2 Aug 2016, at 4:19 PM, Carlos Montero Canabal <[hidden email]> wrote:
>
> Hi Geoff,
>
> Can you tell us how you use Tapestry with PhoneGap? My questions are about how you embed T5 app into PhoneGap system that requires simple html/js. Do you do “Save as” the main IndexPage of Tapestry5 on browser  and put it on PhoneGap project? And deploy the t5 app to manage all the zone updates?
>
> Regards
>
> Carlos Montero
>
>> El 2/8/2016, a las 5:54, JumpStart <[hidden email]> escribió:
>>
>> Totally agree.
>>
>> Most recently I’ve built an extensive tablet app using T5.4 + PhoneGap.
>>
>> It’s massively AJAX, but I didn’t have to think about it very much - thanks to Zones.
>>
>> It employs only 5 pages instead of a few hundred - thanks to components and Zones. SPA without pain!
>>
>> The small amount of custom JavaScript is done as components and is beautiful (I'd never before thought that possible) - thanks to T5.4 using RequireJS.
>>
>> It runs so fast - fast enough to fool most into believing it is a native app - thanks to Zones, RequireJS, and T5.4’s asset handling (and AWS)!
>>
>> But most of all, it has been a joy to build, and it has let me focus on the domain most of the time, which I can’t say is true of any other framework I’ve used (not even GWT).
>>
>> Tapestry, and especially Tapestry 5.4, I take my hat off to you.
>>
>> Geoff
>>
>>> On 29 Jul 2016, at 8:38 PM, Qbyte Consulting <[hidden email]> wrote:
>>>
>>> After years of Tapestry focus I finally got around to checking out how
>>> others are building web apps these days. Spring MVC + REST and Angular seem
>>> to be flavours of the day and can create some quite slick solutions. These
>>> approaches are still full of boilerplate code, but things are looking a lot
>>> better than the early days of Struts.
>>>
>>> So far as I can see Tapestry and maybe GWT are still the only one stop shop
>>> for cutting out the boiler plate code and having a focus on domain driven
>>> design with components instead of these pattern centric low level
>>> approaches.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

Qbyte Consulting
In reply to this post by JumpStart
Thanks for that feedback, it's always interesting to see what people are
doing by combining technologies.

I'm quite liking that REST is getting more popular, it makes a lot of sense
when so many platforms are being used.

It would be cool if Tapestry components could be bound directly to RESTful
resources in the client side instead of directly to page classes for their
data input and output.

I have had problems migrating apps from T5.3.6 to T5.4 so not entirely
happy.






On Tue, Aug 2, 2016 at 4:54 AM, JumpStart <
[hidden email]> wrote:

> Totally agree.
>
> Most recently I’ve built an extensive tablet app using T5.4 + PhoneGap.
>
> It’s massively AJAX, but I didn’t have to think about it very much -
> thanks to Zones.
>
> It employs only 5 pages instead of a few hundred - thanks to components
> and Zones. SPA without pain!
>
> The small amount of custom JavaScript is done as components and is
> beautiful (I'd never before thought that possible) - thanks to T5.4 using
> RequireJS.
>
> It runs so fast - fast enough to fool most into believing it is a native
> app - thanks to Zones, RequireJS, and T5.4’s asset handling (and AWS)!
>
> But most of all, it has been a joy to build, and it has let me focus on
> the domain most of the time, which I can’t say is true of any other
> framework I’ve used (not even GWT).
>
> Tapestry, and especially Tapestry 5.4, I take my hat off to you.
>
> Geoff
>
> > On 29 Jul 2016, at 8:38 PM, Qbyte Consulting <[hidden email]>
> wrote:
> >
> > After years of Tapestry focus I finally got around to checking out how
> > others are building web apps these days. Spring MVC + REST and Angular
> seem
> > to be flavours of the day and can create some quite slick solutions.
> These
> > approaches are still full of boilerplate code, but things are looking a
> lot
> > better than the early days of Struts.
> >
> > So far as I can see Tapestry and maybe GWT are still the only one stop
> shop
> > for cutting out the boiler plate code and having a focus on domain driven
> > design with components instead of these pattern centric low level
> > approaches.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

Thiago H. de Paula Figueiredo
On Tue, 02 Aug 2016 12:23:39 -0300, Qbyte Consulting  
<[hidden email]> wrote:

> It would be cool if Tapestry components could be bound directly to  
> RESTful resources in the client side instead of directly to page classes  
> for their data input and output.

Why not just using pages as REST endpoints? I don't see why using  
components for that would be better.

> I have had problems migrating apps from T5.3.6 to T5.4 so not entirely
> happy.

Which ones?

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

Juan M Garrido de Paz
Hello I'm facing a new project from scratch where i have the desired look
and feel of the clint pages, done with html 5,  js, bootstrap and jquery.
They work as a simple page webapp.

Which is the best option... integration at the front end or at the backend?

I began doing a web app as i always did,  using tapestry as the web
framework, and spring as the model framework, which offers  the model
services that i inject in tapestry pages. But i'm realizing that creating
the html code from tapestry templates and making it work is not easy.

How is the approach of use tapestry just to offer web services to the
frontend? In this case tapestry just serves json objects? Then you dont
need tapestry components and other features for anything , do you? I dont
see the point of using tapestry in this case.

And using tapestry pages instead of web services? Pages here are for
nothing but to hold the event listener method that do the job by calling
the model service, arent they?

I dont see why to use tapestry as the web framework in this cases, as you
just use it as a middleware to call model services. You dont use pages,
components, zones, etc.

Anyway what do you think is better, using tapestry generating the required
front end code? Or using tapestry just to offer the services to the front
end ? (either by web services or by page listeners).

Which approach do you prefer?
El 2/8/2016 18:39, "Thiago H de Paula Figueiredo" <[hidden email]>
escribió:

> On Tue, 02 Aug 2016 12:23:39 -0300, Qbyte Consulting
> <[hidden email] <http:///user/SendEmail.jtp?type=node&node=5732808&i=0>>
> wrote:
>
> > It would be cool if Tapestry components could be bound directly to
> > RESTful resources in the client side instead of directly to page classes
>
> > for their data input and output.
>
> Why not just using pages as REST endpoints? I don't see why using
> components for that would be better.
>
> > I have had problems migrating apps from T5.3.6 to T5.4 so not entirely
> > happy.
>
> Which ones?
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5732808&i=1>
> For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5732808&i=2>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Tapestry-vs-Spring-MVC-REST-Angular-tp5732799p5732808.html
> To unsubscribe from Apache Tapestry Mailing List Archives, click here
> <
> .
> NAML
> <
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

Thiago H. de Paula Figueiredo
On Tue, 02 Aug 2016 14:41:24 -0300, Juan M Garrido de Paz  
<[hidden email]> wrote:

> How is the approach of use tapestry just to offer web services to the
> frontend? In this case tapestry just serves json objects? Then you dont
> need tapestry components and other features for anything , do you? I dont
> see the point of using tapestry in this case.

Live class reloading makes your development way faster.

> And using tapestry pages instead of web services? Pages here are for
> nothing but to hold the event listener method that do the job by calling
> the model service, arent they?

In this case, yes.

> I dont see why to use tapestry as the web framework in this cases, as you
> just use it as a middleware to call model services. You dont use pages,
> components, zones, etc.

You lose using the Tapestry pipelines (specially RequestFilter) for access  
control, profiling, logging, etc.

> Anyway what do you think is better, using tapestry generating the  
> required front end code? Or using tapestry just to offer the services to  
> the front
> end ? (either by web services or by page listeners).
>
> Which approach do you prefer?

I believe the answer is very dependent on the actual scenario you have to  
implement, so I won't give any broad answers.

I'm just saying that REST services can be done. I'm not saying it's the  
best solution.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry vs Spring MVC + REST + Angular

Juan M Garrido de Paz
Thanks Thiago.

I was just wondering wether doing the integration at the front end, using
tapestry for offering rest services, would be easier than the approach i
took.

Never did it before, nor i have experience with js client frameworks,
that's why i asked . What you have to do is identiftying the requests in
the html web app, and call the appropiate  ws of the tapestry app,  that
will return json?
On Tue, 02 Aug 2016 14:41:24 -0300, Juan M Garrido de Paz
<[hidden email] <http:///user/SendEmail.jtp?type=node&node=5732810&i=0>>
wrote:

> How is the approach of use tapestry just to offer web services to the
> frontend? In this case tapestry just serves json objects? Then you dont
> need tapestry components and other features for anything , do you? I dont
> see the point of using tapestry in this case.

Live class reloading makes your development way faster.

> And using tapestry pages instead of web services? Pages here are for
> nothing but to hold the event listener method that do the job by calling
> the model service, arent they?

In this case, yes.

> I dont see why to use tapestry as the web framework in this cases, as you
> just use it as a middleware to call model services. You dont use pages,
> components, zones, etc.

You lose using the Tapestry pipelines (specially RequestFilter) for access

control, profiling, logging, etc.

> Anyway what do you think is better, using tapestry generating the
> required front end code? Or using tapestry just to offer the services to

> the front
> end ? (either by web services or by page listeners).
>
> Which approach do you prefer?

I believe the answer is very dependent on the actual scenario you have to
implement, so I won't give any broad answers.

I'm just saying that REST services can be done. I'm not saying it's the
best solution.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
<http:///user/SendEmail.jtp?type=node&node=5732810&i=1>
For additional commands, e-mail: [hidden email]
<http:///user/SendEmail.jtp?type=node&node=5732810&i=2>



------------------------------
If you reply to this email, your message will be added to the discussion
below:
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Tapestry-vs-Spring-MVC-REST-Angular-tp5732799p5732810.html
To unsubscribe from Apache Tapestry Mailing List Archives, click here
<
.
NAML
<
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>