What's new

PHP Web Development (framework or hardcoded?)

Learn to hardcode first before going to frameworks. May kanya kanyang pros and cons yan.
But I prefer frameworks mas mabilis development hehe
 
Learn to hardcode first before going to frameworks. May kanya kanyang pros and cons yan.
But I prefer frameworks mas mabilis development hehe
tamang hardcode muna para mas na gegets mo yung logic saka pwede mong laruin para pag nag framework kana manili na yung flow
 
johnnyroger tldr: Start with a framework instead of writing one from scratch.

Long version:
You wrote "web development" and not a "hello world application." If it's just a hello world application, then sure you don't need a framework for that.

Whether you use a framework or not, your study of web development is a never ending process. When you go for a real job, you have more attraction if you know a framework than just plain HTML, JavaScript, and CSS. Why? If you know a framework, it is assumed that you know the basics (if you don't then, then go back and study your basics).

You can learn programming logic without doing web development. I don't advise doing web development if you have no idea of what a programming logic is.

Cons of no framework:
  • It's a recipe for disaster
  • Eventually you will be creating your custom framework and unless you are versed in writing framework, more than likely you are just creating a big mud of tech debt. So you are avoiding a framework in the first place but you ended up creating one anyway.
  • It's hard to communicate your app to a fellow developer. Programs are like stories. If the only person who can understand your story is you, then other people cannot appreciate what you wrote and if they cannot appreciate it, they can't maintain it either.
  • If you tell me you wrote your app using React, then if you share me your app, I already have certain expectations on where to find things because you are following a framework where there are standards that have to be followed. If you are creating your own, let me ask you this and tell me where I can find them:
    • Do you use components? Where are the docs
    • Internationalization support
    • Testing methodology
    • How do you split data management and presentation layer
    • How do you provide routing
    • Browser history management
    • What about bundling for production
    • Do we do one way or two way binding
    • etc
So again if you are just doing a hello world application, then we have no argument here. Don't use a framework in that case, but if your intent is to create production level web apps, then please use a framework unless you are really that smart to create one. Maybe you are, and I would probably be interested to see what custom framework you will make and maybe we can publish that as open source framework? Let's challenge Facebook and Google's dominance with their React and Angular frameworks.
 
framework sakin pero i would suggest mag hard code ka muna bago magframework para mas maiintindihan mo pag mag eedit ka
 
Kung di ka nagmamadali alamin mo lang fundamentals then go for laravel. kung nagmamadali ka rekta mo na sa laravel. Ako rekta lang ako sa laravel dun na ako natuto ng php.
 
well, it will depend on your project requirements. How it should be done and when it should be delivered. If your project dev timeline is ample and you are comfortable writing a bunch of custom-hard-coded framework then there is no problem to that. It goes the same on HOW it should be done. If you work alone then its fine. Otherwise, if you have to collaborate with your fellow devs then making your own framework is not a good idea usually because of patterns and architectural issues.

Framework are made available for a better project development. It is not an optional thing for if you are experienced or not. I mean, use should be using it when it's needed.

I my own view, utilizing framework is better than writing your own. You do not want to reinvent the wheel because that might just ruin your project output for so many reasons(I cannot Itemize it anymore here).
 
Good day mga ka devs! Para sa inyo ano ba mas maganda sa Web Development? with framework or without? base on your experience what is the pros and cons?
Salamat po!


/* Framework or hard written codes ?
* let me give you an insight and ikaw mag decide
*
* for me its depend kung ano ang magiging part ng framework sa web app or web site,
* first think if gaano ba kalaki ang website or web app mo,
* ilang page meron ba ito Single Page Application or Information System Web site
* ano ba ang ma cacater ng framework sa website na i buibuild ko,
* and saang language ko ito gagamitin, kasi ngaun 2019 almost lahat ng language my framework na
* CSS, JS, PHP, etc
*
* and i evaluate mo if san ka mas mag bebenifit and magiging efficient ang codes mo,
*
* Framework kasi is collection of pre-build functions to help you develop much faster
* pero minsan hindi mo kelangan ang frameworks,you just need a library
*
* note! magkaiba ang library and frameworks
*
* Frameworks if a bundle package of collection of functions
* Library is collection of function for specific target modules
*
* Example: Laravel frameworks meron na siyang Route handler modules, Database Modules, Template engine modules etc.
* Example: MysqlDbi Library: focus only on Database modules
*
* Kasi its not worth to use frameworks kung hindi mo gagamitin lahat ng pre-built modules nito,
*
* Lahat ng frameworks may ibat ibang approach, pero similar sila sa MVC patterns mostly.
*
* Minsan kasi naabuse natin ang paggamit ng frameworks kasi madali lang kesyo may pattern,
* na iniisip natin lahat magagawa sa gantong framework which is wrong :)
*
* */
 
alam ko mejo late na to, pero ts might mean hand coded rather, mas kilala kasi yung term na "hardcoded" as mga values ng variables na nakalagay mismo sa source code gaya ng connection string. kelangan pang irecompile yung buong application para lang mapalitan yung isang value na yun sa loob ng source code mo(at iredeploy yung app sa production, in short, kunsumisyon). don't do that. use configuration files instead like web.config or app.config o kaya ilagay mo sa database or sa registry yung mga values (a very common practice sa industry).

moving on. i will always suggest you learn both. many of us prefer to choose one over the other method to save time. however, sa programming di yun nakakatulong. kung marunong ka magbootstrap pero di ka marunong mag css, pano na pag may pinaedit sayo sa loob ng bootstrap.css, or gusto mong fusion ng bootstrap at sarili mong css flavor yung layout ng website mo di ba? same sa mga php at javascript frameworks. aralin yung basic tapos pag marunung runong ka na, saka ka magframework. that way di ka maliligaw kahit kaninong code pa ng kung sinong developer yung gamitin mo. in short, from scratch muna tapos frameworks na pag mejo bihasa ka na sa basics.
 
hardcoding ang ginagawa ko pero hindi pa ako marunong sa framework... :D mobile web design lang ang palaging nagagawa ko kagaya ng pisovpn, pero mahina ako pagdating sa talagang web design,,need ko pang magdownload ng template para makagawa ng web design..sabi nila sa framework e hindi na daw kailangan magdownload ng template..no idea ako sa framework..
 
@johnnyroger

Hello, good question tol,

In my exp with PHP and JS, I started from scratch. In fact, procedural pa yung level na alam ko, which later found out, hirap mg maintain nang code along the road, pag naging complex na yung application, for me, it was my fault, without research what are the best practice.

Hindi naman tinuro sa professor ko yung best practice eh! Kaya i learned this in a hard way.

Kumapit ako sa JQuery for JS, and Codeigniter for PHP, thinking, these tools can speed sa process. Which, is indeed, serves its purpose, However, behind the scene, depended ako sa documentation, without the knowledge how to create and understand each function from scratch.

With said, promise ko sa sarili ko, this 2019, I will try basics muna sa JS.

Kaya, bumili ako nang courses sa Udemy and read ng articles. Ngayun, ng make sense na yung mga functions na ginamit ko both JQuery and Codeigniter. In fact, mas interested pa ako sa JS ngayung, given, exciting ang React para sakin.

At this point, suggest ko sayo, from scratch gawa ka basic app. Try mo Blog application, kahit basics lang. This could be JS or PHP.

From here, gawa ka bagong version mo gamit na desired framework mo in my case (React which is consider as library ), then have the same functionality, this time, take advantage mo yung feature na gusto mo framework or library

Mas marami kang matutunan, plus meron good courses available online, these could be ρáíd or free. So far, I am follow these people sa TY or Udemy,

- Brad Traversy
- Mosh Hamedani
- Web Dev
- Net Ninja
- Anthony Alicea
- Brad Schiff

At this point, React and WordPress core are my interest.

In a nutshell, from scratch if you are starting out, then switch to framework or lib if you are comfortable with your skill set.
 

Similar threads

Back
Top