Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 How long to pick up web app development?

views
     
malleus
post Jun 11 2020, 10:01 PM

Look at all my stars!!
*******
Senior Member
2,096 posts

Joined: Dec 2011
QUOTE(mmweric @ Jun 11 2020, 03:53 PM)
I thought SQL is the easiest thing to learn in the development world.  It hasn't changed since I started work in 1995 while there have been so many
programming paradigm changes 5 years later a new guy would have no problems maintaining the code while for ORM I bet the new guy would be complaining
what the hell is this haha 
SQL itself may not have changed much, but availability of hardware resources has, and with that, thoughts on schema design too.

With storage costs getting really cheap, its getting quite normal to duplicate data across tables to prevent the need to do joins, especially across potentially massive tables. Simplifies the queries needed to run reports too.
Jaspery
post Jun 12 2020, 03:44 AM

New Member
*
Validating
4 posts

Joined: Jun 2020
QUOTE(mmweric @ May 1 2020, 01:05 AM)
Hi, 

I would like an opinion lets say if I have experience (meaning I have actually done it) but forgotten
(can''t do it today without reading up a lot of stuff)  C++, Microsoft Foundation Class and limited SQL skills. 

How long do you think it would take for me to pick up the skills and build a Financial Planning responsive web app with about 30 screens using Javascript, jQuery, Chart.js, HTML, CSS, MYSQL, Bootstrap and PHP.  Requirements for this app would be user login with integration to facebook and google, a dashboard, forms with error checking, sliders for data and interactive charts.

Please take note I have never developed in a web environment before.

Any very rough timeline would be welcomed.

Thanks.
*
WordPress probably the best place to start for beginners.
I have worked in web development for 4 years, starting from WordPress with nightmare numbers of plugins but it worked. That can get you running pretty quickly with the right plugins, but all Web developers would be cringing really hard if they dig through your backend

but building user login, integrate facebook/google, dashboard, forms with validation, sliders for data, interactive charts from ground up? that I would not attempt without adequate timeline tongue.gif
QUOTE(bumpo @ Jun 11 2020, 04:09 PM)
at one point this might be the case but these days with the fascination and emphasis on frameworks instead of the basics itself, getting non seasoned developers that are reliable on sql is not easy
vast majority can handle the typical selects and what nots but when more complex queries are required they are totally lost or worst comes up with a query that is too inefficient  rclxub.gif
*
May I ask what other basics that you think webdev should focus on? beside html, css, js, sql
bumpo
post Jun 12 2020, 09:53 AM

On my way
****
Junior Member
632 posts

Joined: Mar 2013


QUOTE(Jaspery @ Jun 12 2020, 03:44 AM)
May I ask what other basics that you think webdev should focus on? beside html, css, js, sql
*
when i say basics, i didnt mean the different technology components like that
lets say some one that knows how to use angular to build a simple page with some table that gets the content from backend
now if we take away angular, if that person can still build the same page then i would say that person knows the basics well.
most i find is unable to do this as they strive to learn and understand angular and not the basics

another basics for webdev that i feel would set them at least a class above from the rest is knowledge on http and webserver nod.gif
Jaspery
post Jun 12 2020, 06:56 PM

New Member
*
Validating
4 posts

Joined: Jun 2020
QUOTE(bumpo @ Jun 12 2020, 09:53 AM)

when i say basics, i didnt mean the different technology components like that
lets say some one that knows how to use angular to build a simple page with some table that gets the content from backend
now if we take away angular, if that person can still build the same page then i would say that person knows the basics well. 
most i find is unable to do this as they strive to learn and understand angular and not the basics

aah, I get what you mean. Though I kinda understand why they want to skip all the steps and head straight to the juicy framework.
I mean... look at this <_<
user posted image
QUOTE(bumpo @ Jun 12 2020, 09:53 AM)

another basics for webdev that i feel would set them at least a class above from the rest is knowledge on http and webserver nod.gif
*


bwahahaha, I'm still struggling with these rclxub.gif
bumpo
post Jun 12 2020, 07:12 PM

On my way
****
Junior Member
632 posts

Joined: Mar 2013


QUOTE(Jaspery @ Jun 12 2020, 06:56 PM)
aah, I get what you mean. Though I kinda understand why they want to skip all the steps and head straight to the juicy framework.
I mean... look at this  dry.gif
user posted image
bwahahaha, I'm still struggling with these  rclxub.gif
*
dont let that diagram fool you. while it is not wrong, it is not right either. it is so packed full of fluff. so many things listed there is not necessary.
it started good but then derailed and focused on all the frameworks instead which i feel makes it look far more convoluted than what it should be.

i mentioned http and webserver because
1) everything that appear on browser will come from webserver one way or another. having some basic knowledge on webserver will greatly help as this knowledge can help you make design decisions that others cant make laugh.gif
2) ever seen some websites showing funny chars like "ALI &amp; ABU"? ever hear the dev saying i dont know where "amp;" came from since user data is only "ALI & ABU"? dealing with these clueless response gets frustrating real fast rclxub.gif



Legozz
post Jun 12 2020, 07:15 PM

Getting Started
**
Junior Member
206 posts

Joined: Dec 2012
If you have nothing else to do, 1 month can already. Of course, study day until night.

Longer to be professional.
SUSjbcoder
post Jun 12 2020, 09:40 PM

Enthusiast
*****
Junior Member
783 posts

Joined: Sep 2019
QUOTE(malleus @ Jun 11 2020, 09:56 PM)
Out of curiosity, what exactly do you use in place of a controller? And how do you do separation of concerns?
*
A PHP based api can be condensed to just this. No framework needed. I don't do restful stuff. I prefer RPC style calls.
No dealing with url rewrite issues. The entire 'controller' is just an associative array with some checking.

Front-end uses vue/react/angular or whatever, which is already separated.

Every function being called is free to do their own validation their own way and access db/models their own way.


CODE


$api = array(
   "register" => function ($data) { register_User($data); },
   "getprofile" => function ($data) { get_profile($data); },
   "changepassword" => function ($data) { change_Password($data); },
   "login" => function ($data) { login_User($data); },
   "logout" => function ($data) { logout_User($data); },
   "verify" => function ($data) { verify_User($data); },
   "getcat" => function ($data) { get_categories(); },
   "getitems" => function ($data) { get_items($data); },
  );


  $data = json_decode(file_get_contents('php://input'));

  if ($data) {
       if (!isset($data->command)) {
           send_Error("Invalid JSON");
           return;
       }

       if (isset($api[$data->command]))
           $api[$data->command]($data);
       else
           send_Error("Unknown Command");
  }
    else {
       send_Error("Unknown Format");
  }



code from js sample
CODE

const payload = {
       command: 'changepassword',
       token: this.token,
       name: this.userName,
       email: this.userEmail,
       password: this.userPassword
     }
     axios.post(Utils.urlApi, payload).then(response => {
       if (response.data.status === 'OK') {
         this.errorText = '';
         this.setUserName(this.userName);
         Utils.setCookie('userName', this.userName);
         this.showChangePasswordDialog(false);
       } else {
         this.errorText = response.data.errorText;
         // console.log(response.data)
       }
     }).catch(error => {
       alert(error);
     })


This post has been edited by jbcoder: Jun 13 2020, 09:01 AM
SUSjbcoder
post Jun 12 2020, 10:04 PM

Enthusiast
*****
Junior Member
783 posts

Joined: Sep 2019
QUOTE(silverhawk @ Jun 11 2020, 03:50 PM)
Its a pattern, its your choice to use or not depending on the situation. To say its obsolete is incredibly naive, you sound more like those fresh grads spouting about the latest tech. MVC is a good way to get started for beginners as it helps separate the concerns of the different app layers.

In the case of SPA, you've not really abandoned the MVC pattern. Its just that the view layer is moved to the SPA together with "some" of the view control actions. The API typically still has files that receives your inputs and outputs data for you, validated or doing a myriad of operations before its passed to the data layer. So there's still some model control code around, and that would be your controller.
In laravel, you don't have to use MVC if you don't want to. You can just do something like

CODE

Route::get('users', function() {
   // raw sql
// return json
});

Any server side rendering? None. Don't need it, don't use it. The benefit of a framework is that it helps you handle all the nitty gritty things so you don't have to think about it anymore. Great for people starting out, like TS. The downside of it however is that sometimes because its so easy to use, you get a lot of "tutorials" online that give bad lessons, something PHP experienced in its early days too.
*
Laravel is bloated for api. 50 requests per second vs 5000 requests per second with raw php for api, I'll stick with raw PHP. I am not spouting anything new. The problem with these heavy MVC framework is they take time to load and you have no idea what is done behind the back for every url request. That's why raw php api requests can be way much more efficient than these full frameworks and eat less memory.

If must use a php framework for server api, Slim is probably a better choice than laravel or lumen. It's lightweight but still, lose to raw php.

https://www.reddit.com/r/PHP/comments/3dz8h...ally_pure_sham/

LUMEN Requests per second: 240.53 [#/sec] (mean)
SLIM3 Requests per second: 497.75 [#/sec] (mean)
LARAVEL 5 Requests per second: 47.27 [#/sec] (mean)
RAW PHP Requests per second: 5248.06 [#/sec] (mean)
Jaspery
post Jun 13 2020, 12:44 AM

New Member
*
Validating
4 posts

Joined: Jun 2020
QUOTE(bumpo @ Jun 12 2020, 07:12 PM)
dont let that diagram fool you. while it is not wrong, it is not right either. it is so packed full of fluff. so many things listed there is not necessary.
it started good but then derailed and focused on all the frameworks instead which i feel makes it look far more convoluted than what it should be.

i mentioned http and webserver because
1) everything that appear on browser will come from webserver one way or another. having some basic knowledge on webserver will greatly help as this knowledge can help you make design decisions that others cant make  laugh.gif 
2) ever seen some websites showing funny chars like "ALI &amp; ABU"? ever hear the dev saying i dont know where "amp;" came from since user data is only "ALI & ABU"? dealing with these clueless response gets frustrating real fast  rclxub.gif
*
its more of a general guideline and most clients doesnt care what you use as long you got their website up. The roadmap still demonstrate how much tools a web developer have to go through before they should really touch on frameworks
every jobs is never straight-forward and always have me bouncing around learning new stuff (which is important). and I also one of those webdev have a rude awakening when client/boss suddenly expected you to setup a webserver from a fresh linux thru SSH with zero knowledge. That is stuff of nightmare biggrin.gif
malleus
post Jun 13 2020, 07:50 PM

Look at all my stars!!
*******
Senior Member
2,096 posts

Joined: Dec 2011
QUOTE(jbcoder @ Jun 12 2020, 09:40 PM)
A PHP based api can be condensed to just this. No framework needed. I don't do restful stuff. I prefer RPC style calls.
No dealing with url rewrite issues. The entire 'controller' is just an associative array with some checking.

Front-end uses vue/react/angular or whatever, which is already separated.

Every function being called is free to do their own validation their own way and access db/models their own way.
CODE


$api = array(
   "register" => function ($data) { register_User($data); },
   "getprofile" => function ($data) { get_profile($data); },
   "changepassword" => function ($data) { change_Password($data); },
   "login" => function ($data) { login_User($data); },
   "logout" => function ($data) { logout_User($data); },
   "verify" => function ($data) { verify_User($data); },
   "getcat" => function ($data) { get_categories(); },
   "getitems" => function ($data) { get_items($data); },
  );
  $data = json_decode(file_get_contents('php://input'));

  if ($data) {
       if (!isset($data->command)) {
           send_Error("Invalid JSON");
           return;
       }

       if (isset($api[$data->command]))
           $api[$data->command]($data);
       else
           send_Error("Unknown Command");
  }
    else {
       send_Error("Unknown Format");
  }

code from js sample
CODE

const payload = {
       command: 'changepassword',
       token: this.token,
       name: this.userName,
       email: this.userEmail,
       password: this.userPassword
     }
     axios.post(Utils.urlApi, payload).then(response => {
       if (response.data.status === 'OK') {
         this.errorText = '';
         this.setUserName(this.userName);
         Utils.setCookie('userName', this.userName);
         this.showChangePasswordDialog(false);
       } else {
         this.errorText = response.data.errorText;
         // console.log(response.data)
       }
     }).catch(error => {
       alert(error);
     })

*
Kind of looks like what we are doing in both Go and Elixir, basically a light weight router that dispatches to what we call controller functions, instead of making use of existing frameworks.

In our last project, we decided not to use the Phoenix framework, as what we needed was just a tiny subset of what its got to offer, so we just started off with the Erlang Cowboy webserver and built upwards from there. Although we didn't need to store data, making use of Erlang Ecto ORM's validation functions was still very useful for validating required parameters.

Separating into a 'view' layer is still useful despite not having a UI, as all our JSON responses have a standardised structure to them, and also useful for constructing the response payloads that requires some transformations after processing.
TSmmweric
post Jun 14 2020, 12:34 PM

Getting Started
**
Junior Member
156 posts

Joined: Jan 2020
QUOTE(Jaspery @ Jun 12 2020, 03:44 AM)
WordPress probably the best place to start for beginners.
I have worked in web development for 4 years, starting from WordPress with nightmare numbers of plugins but it worked. That can get you running pretty quickly with the right plugins, but all Web developers would be cringing really hard if they dig through your backend

but building user login, integrate facebook/google, dashboard, forms with validation, sliders for data, interactive charts from ground up? that I would not attempt without adequate timeline tongue.gif

May I ask what other basics that you think webdev should focus on? beside html, css, js, sql
*
Thanks for your advice.

Actually I feel any framework or no framework would suit my needs as am building a SPA which only needs WebApi which can be built using Wordpress, Laravel, Express, or just plain node.js or PHP with PDO.

After trying out a few web technologies I feel that for me I mainly just need to know javascript, html, css and all their related technologies and libraries which would take me maybe about a half a year to build something and years to master.

Unfortunately, as I am not only a web developer and trying to set up my own SAAS application I do need to know a lot of other technical stuff like setting up security, web server, backup, dr, DB replication, monitoring, performance and cost optimization. From the business side, I need to know about marketing, sales, and operations.

This post has been edited by mmweric: Jun 14 2020, 12:38 PM
silverhawk
post Jun 23 2020, 10:43 PM

I'm Positively Lustrous
Group Icon
Elite
4,738 posts

Joined: Jan 2003


QUOTE(jbcoder @ Jun 12 2020, 10:04 PM)
Laravel is bloated for api. 50 requests per second vs 5000 requests per second with raw php for api, I'll stick with raw PHP. I am not spouting anything new. The problem with these heavy MVC framework is they take time to load and you have no idea what is done behind the back for every url request. That's why raw php api requests can be way much more efficient than these full frameworks and eat less memory.

If you know what you're doing, that's fine. I've worked with enterprise systems that have apis/scripts written in raw php. Due to bad design or poor experience in PHP its a bloody mess, and the juniors have a hard time understanding and fixing issues.

The "bloat" comes with benefits of architecture, documentation and extensibility. Which in turn leads to better maintenance and faster development. The cost you save from the human time far exceed what you save in execution speed.

QUOTE
If must use a php framework for server api, Slim is probably a better choice than laravel or lumen. It's lightweight but still, lose to raw php.

https://www.reddit.com/r/PHP/comments/3dz8h...ally_pure_sham/

LUMEN      Requests per second:    240.53 [#/sec] (mean)
SLIM3      Requests per second:    497.75 [#/sec] (mean)
LARAVEL 5  Requests per second:    47.27 [#/sec] (mean)
RAW PHP    Requests per second:    5248.06 [#/sec] (mean)
*
I've read that reddit post before. You should read the threads abit deeper, there's a discussion on how meaningless the comparison of these numbers are.

If you're getting 50-100 requests a second, your site is doing pretty damn well and you can easily throw hardware at the problem for cheap and only focus on optimizing where optimization is absolutely necessary (e.g. DB query). If you really want to, you can try to optimize it to raw PHP, but its typically not worth the development time and cost.

QUOTE(mmweric @ Jun 14 2020, 12:34 PM)
Unfortunately, as I am not only a web developer and trying to set up my own SAAS application I do need to know a lot of other technical stuff like setting up security, web server, backup, dr, DB replication, monitoring, performance and cost optimization.  From the business side, I need to know about marketing, sales, and operations.
*
Most web-devs have to know how to do the basic dev-ops stuff, but like previous advice, do the basic minimum you need. Don't try to dig in deep and understand everything, its just too much to take at once and end up you don't progress in your project because you're stuck researching/learning and getting headaches from the overload.
malleus
post Jun 24 2020, 10:26 PM

Look at all my stars!!
*******
Senior Member
2,096 posts

Joined: Dec 2011
QUOTE(silverhawk @ Jun 23 2020, 10:43 PM)
If you know what you're doing, that's fine. I've worked with enterprise systems that have apis/scripts written in raw php. Due to bad design or poor experience in PHP its a bloody mess, and the juniors have a hard time understanding and fixing issues.

The "bloat" comes with benefits of architecture, documentation and extensibility. Which in turn leads to better maintenance and faster development. The cost you save from the human time far exceed what you save in execution speed.
I've read that reddit post before. You should read the threads abit deeper, there's a discussion on how meaningless the comparison of these numbers are.

If you're getting 50-100 requests a second, your site is doing pretty damn well and you can easily throw hardware at the problem for cheap and only focus on optimizing where optimization is absolutely necessary (e.g. DB query). If you really want to, you can try to optimize it to raw PHP, but its typically not worth the development time and cost.
Most web-devs have to know how to do the basic dev-ops stuff, but like previous advice, do the basic minimum you need. Don't try to dig in deep and understand everything, its just too much to take at once and end up you don't progress in your project because you're stuck researching/learning and getting headaches from the overload.
*
Before using anything custom, I always ask the following questions:
- what exactly is the problem that we are trying to solve?
- what exactly is the value to the stakeholders (literally referring to those paying us money for our time)
- are we doing this just because of the Not invented here syndrome

For most purposes, there's no real value in going that low level (for a script language anyways), when an existing framework can do the work. If the most popular framework out there is too heavy weight for your liking? Then pick a slimmer framework that provides just what you need.

My main problem with trying to do a custom implementation these days is that in almost all cases, it'll end up as something that's horribly documented and maintained, and years later, nobody will dare to meddle much with the internals for fear of breaking something, unless you choose to open source your new framework and a sizeable enough following takes it up.


4 Pages « < 2 3 4Top
 

Change to:
| Lo-Fi Version
0.0144sec    0.29    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 10:18 PM