Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: API vc MVC Date: Mon, 27 Jul 2015 22:36:40 -0400 Organization: Aioe.org NNTP Server Lines: 42 Message-ID: References: <6a96955c-6b2a-416e-9be1-8c5bcc12ff3e@googlegroups.com> <1s3pjel7zj5r5.14vjkiodgf3ii.dlg@40tude.net> NNTP-Posting-Host: bLmKSxgyEsD8qtT7wjgUDQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:32174 On 5/12/2015 2:09 AM, Joerg Meier wrote: > On Mon, 11 May 2015 19:04:27 -0700 (PDT), Leonan Luppi wrote: > >> I have a sad doubt about this subject's. Today what is better? > >> Use MVC Pattern and consuming request to load my view or just >> create an API which any client can access (my environment, my >> front-end will be AngularJS or any javascript MV* framework). I >> mean what can be more scalable, performatic? > > What is better, a screwdriver or the colour blue ? Your question > makes no sense, the comparison it nonsensical, and you could even > simply combine the two. If looking at the strict basic definitions of MVC and API then you are 100% correct. But if you use the terms in the more informal way that are common among web developers then the question makes perfect sense - and are in fact a question most Java web developers are considering these days. MVC = server side HTML generation using Java MVC web framework like Struts, Spring MVC and to some extent JSF. API = JavaScript application running client side (using AngularJS or similar framework, could be a single page application) talking to server side API which in Java typical would be JAX-RS based. Very standard choice. If you were in the .NET world then you would chose between ASP.NET MVC and ASP.NET Web API. > Neither MVC nor an API have any inherent properties when it comes to > scalability either. That is true. Arne