If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

PHP vs. VueJS and Bootstrap for Web Development

Started by Kurlebas, Dec 31, 2023, 08:49 AM

Previous topic - Next topic

KurlebasTopic starter

Greetings, esteemed community.

I have been immersed in web development since 2007, making myself akin to a dinosaur in this field. My expertise lies in crafting code using pure PHP (alas, in a procedural fashion) and native JavaScript (often supplemented by jQuery).



Throughout my career, I have often found myself as the sole specialist, thus having to wear the cap of a full-stack programmer. While I acknowledge that I may have fallen short on the self-education front, the demands of my work always kept me engrossed with little room to spare.

Consequently, the sites and web applications I produced were characterized by dynamic HTML pages generated in PHP, accompanied by JS code. When local data manipulation was necessary in the client's browser, an ajax request would be dispatched to the server, which then crafted an assembled HTML block for insertion into the appropriate location.

I've come to understand that the landscape has evolved significantly. Presently, the server's role is limited to serving as a data source and processor, akin to API services, while the client-side has become the focal point for interface generation, largely through JS frameworks.

My confusion arises from the fact that while everyone appears to have migrated towards JS frameworks, thereby shifting rendering responsibilities to the client side, this places certain demands on the client's hardware, mandating sufficient performance to prevent sluggishness. Simultaneously, Google, through tools like Lighthouse, emphasizes the need for speedy load times and responsiveness, particularly emphasizing compatibility with older smartphones in site rankings.

Before reaching out for guidance, I delved extensively into research, feeling somewhat overwhelmed by the current situation. It is evident that Object-Oriented Programming (OOP) has become the norm with no viable alternatives. As for PHP, I've opted to explore Laravel, while for JS, CSS, and HTML, I've recognized the necessity to master Bootstrap for adaptive layout and VueJS for its prowess as a JS framework.

My apologies for the protracted preamble; now, onto the pivotal queries:

How does one cater to the following requirements for a website/web application?
- Ensuring universal display compatibility across smartphones, tablets, and desktops
- Guaranteeing seamless functionality on older/affordable smartphones

Should the client and server aspects be segregated: processing and delivering data in pure PHP, while constructing the interface with VueJS and Bootstrap?
Or
Would it be preferable to persist with PHP, especially Laravel, for dynamically generating pages paired with Bootstrap and jQuery?

I extend my heartfelt gratitude for any counsel you may offer. Thank you.
  •  


thietkeweb3s

To cater to the requirements for universal display compatibility across different devices, a responsive web design approach is indispensable. This involves utilizing a flexible grid system combined with media queries to ensure that the layout and content of the website adapt seamlessly to various screen sizes, including smartphones, tablets, and desktops. Bootstrap, with its mobile-first approach, provides an excellent framework for achieving this goal, as it offers a plethora of responsive components and utilities.

Now, when it comes to ensuring seamless functionality on older or affordable smartphones, performance optimization becomes crucial. One approach is to minimize the use of JavaScript and employ lightweight CSS for styling and layout. This can help in reducing the load on the client's hardware, thus improving the overall performance and responsiveness of the website. Additionally, implementing lazy loading for images and optimizing asset delivery can significantly enhance the browsing experience on such devices.

As for the segregation of client and server aspects, embracing a modern, decoupled architecture is highly recommended. Leveraging VueJS for client-side interface generation allows for the creation of dynamic, responsive, and interactive user interfaces, while Bootstrap complements this by providing a solid foundation for the layout and design. Meanwhile, the server, powered by PHP (specifically Laravel), can focus on efficiently processing and delivering data through RESTful APIs, thereby adhering to the principle of separation of concerns and promoting scalability and maintainability.

In contrast, persisting with PHP for dynamically generating pages paired with Bootstrap and jQuery may lead to a heavier reliance on server-rendered HTML, potentially hindering the performance and interactivity of the web application. jQuery, although still valuable for certain tasks, has seen a decline in usage with the rise of modern JS frameworks due to its limited support for building complex, data-driven UIs.
Embracing a modern tech stack that includes VueJS for client-side interactivity, Bootstrap for responsive design, and Laravel for robust backend API services can effectively address the demands for compatibility and performance. Continuously optimizing and refining the website/web application based on real-world performance metrics and user feedback is paramount in ensuring a compelling and inclusive user experience across diverse devices and network conditions.
  •  

sinelogixweb

I believe that the relevance of the technology stack is crucial mainly in extensive projects with large teams and frequent updates. In such cases, the initial choice of the stack significantly impacts all subsequent development. However, in the majority of other scenarios, the technology stack becomes inconsequential as long as the task is successfully completed.
I have been immersed in website development since the early 2000s, and I closely monitor emerging trends, programming languages, frameworks, and integrated development environments. Nonetheless, I personally see no compelling reason to transition to these new technologies. The overwhelming majority of web development projects can be effectively executed using platforms like Wordpress or similar engines, often requiring minimal customization. Only a small fraction of clients truly grasp their specific requirements, such as a single-page application hosted on a cloud platform with a non-relational database. Even the advent of SASS, which revolutionized front-end development, failed to persuade me of its necessity. Despite investing time in watching explanatory videos and comparisons, I remain unconvinced. I firmly believe that by meticulously crafting basic CSS styles, breaking them into modular components when necessary, and adopting a thoughtful approach, one can circumvent potential issues.

Over the past decade, the only substantial alteration in my professional realm has been the incorporation of object-oriented programming principles into my code and the transition from Dreamweaver to Atom as my preferred coding environment. Everything else, including PHP, MySQL, HTML, CSS, and JavaScript with jQuery, has remained constant. Astonishingly, this suite of technologies continues to resolve all the challenges I encounter, leaving me devoid of any perception of obsoleteness or inadequacy.

It seems to me that the true indicator of innovation lies in the absence of doubt when encountering a genuinely groundbreaking and efficient solution. When such a solution emerges, the question shifts from "why do I need this?" to "is it worth adopting?" It becomes evident that the new technology offers tangible benefits, streamlining and enhancing the entire development process and its outcomes.
  •  

craigwilson

I used to work on both front-end and back-end components, employing procedural, functional, and object-oriented programming techniques. Over time, I realized the need for a more efficient approach and developed a small framework to streamline the process. However, the demand for complex forms and integrations with various systems led me to reevaluate my toolset.

The challenges of managing extensive forms with dynamic logic and customer requirements pushed me to explore new technologies and methodologies. Despite initial resistance, I embraced the transition from jQuery to React, recognizing its potential for creating dynamic and scalable applications.

My journey of self-improvement led me to delve deeper into JavaScript and databases, eventually assuming a mentoring role to solidify my knowledge. Looking ahead, I am eager to return to full stack development, now with a focus on Node.JS + React, as this combination aligns with my preferences for modern, flexible, and efficient development tools.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...