MB js


I know...but I liked the picture

What?


Create a JS interface/web for the user.

Avoid not necesary PHP (server side code) 
...for the front-end.

Could replace our current front-end perfectly.

A lot of benefits!


Now, let's check what's more...

current scenario

  • 2 servers
  • 2 different codes/ways - PHP n JS


new JS scenario

  • "1'5" servers
  • two codes sharing some libraries

So, what's the point, like?


  • Fast development and less code
  • We don't need a second server
  • Performance
  • More security
  • Less resources = less costs
  • One code for X platforms

  • Magic like "Ajax effects"

Fast dev n less code


  • API calls logic
    • Shared between apps
    • So simpler and just one class

  • No models, no repos ~50%
    • We don't need them
    • They are the "json objects"
    • Validation just in the forms

No second server


  • Cheaper
  • Less headaches
  • No "tricky" deployments
    No more WhyT* is so hard to...
  • No big libraries needed

To explain more in the following chapter...

Performance


  • Depends of the client's pc
  • No more calls to check the
    validation or forms
  • The server just send the page once,
    don't print each one

more security

for sure...and why?

  • No session cookies to the front-end
  • Less data to send
    • No checking forms with PHP
  • Just one connection

Now, let's discuss it

Less resources = less costs


As commented, we don't need too much

  • Development
    • We don't need Apache or PHP server
    • Again, faster to code n can be shared
  • Production
    • Again, just serve the page

Ash nazg durbabatulûk

or "ONE RING TO RULE THEM ALL"


We can deploy the code to:

  • mobile phones
  • websites
  • chrome app as Desktop app?
  • other JS platforms
  • ...

alright...We have done a (not a huge) mistake...but tsss...


We have been parsing the models and repositories

That was not necessary

not everything is gold











piiiiiiiiii


    • To check with IE
      • + full of resources to fix problems
      • - take bit of time
    • All the (Front end) logic runs on the user's pc
      • + server code can be created if necessary
        • Code is visible
          • + Can be obfuscated
          • + We have already it on the mobile app
    • "No SEO"?
      • We don't need it
      • If we need we just create static pages for it

    user needs Javascript


    User already needs javascript for our current code


    examples


    • Same scenario
      • Front-end changed from PHP to Ang


    Other AngularJS examples

    so what's next?


    • Create an stable version
    • Vote to be applied for the next project
      and see that it fits.




    and
    ...

    fire the front-end 

    php developers



    Thanks






    btw, all these odd texts and images were by jaume ;)

    MB js

    By jaume tarradas