questions about php and node.js with answers [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm working with PHP and I love this language but when I look at big websites there a small percentage of them using PHP and the rest of using node.js etc, so based on the big websites like Netflix, etc, have some questions
1- Is PHP required in companies?
2- what PHP framework should I learn
3- what frontend framework, etc, good for PHP?
4- is node.js better than PHP
if there is anything wrong or you can correct me I'm here to learn :)
I'm very lost I really need the answer I don't know where to go.

in PHP there is no way to automatically refresh the page however
there is a guide on this page to do that
if you started to use a framework like Laravel you can do that with
the Browsersync plugin
I have seen a lot of PHP and Laravel projects requests in freelancing
websites than node js so yes it's required
both languages are needed there is no language better than the other
one each one have its use cases

Related

Does the php code always mix with html code? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
In web development, does the backend code always mix with the front code at some point? Checking jsp and some php I see that the code is usually mixed, is this a bad practice or should you always avoid using javascript as an intermediary?
Normally it depends on what you really want to do. But they are usually mixed
PHP was developed as a templating language for web, so basically it is what it was created for. But you might notice that in modern projects PHP used mostly as an API backend for Javascript application. In such cases, it will not be mixed.
It seems to me that it depends on the project type. But even if you do not use modern JS frameworks try to separate business and frontend logic. Check the MVC architecture or DDD.

simulate a server vs running the html file [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I recently started some web-design and when I look for tutorials on youtube I often see people, when checking their code, using some kind of virtual server to upload and then see their page. I was wondering what difference would there be to simply lunch the html file I'm working and see it through my browser? Does it really make a difference to use a local server? and if yes which ways would you recommend to achieve that?
Thanks!
If you just have pure html and css then opening the file in the browser is the exact same as opening it in a server. However, the real difference is with javascript. If you try to make an HTTP request using js to your own site, it will work on a server but will not work if you open it as a file. If you want to start a server, python has a SimpleHTTPServer module, and most code editors have some sort of plugin, like VS Live Server for VS Code.

Should a markdown parser be client or server side [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm currently working on a PHP project, which should use markdown to display some text.
The question I ask myself now since there are markdown parsers for javascript and PHP is if I should parse the markdown Server or Client Side.
Pros Server-side:
Always the same, even on clients which have javascript disabled.
Pros Client-side:
More dynamic allows for Preview function.
Uses Clients-Resources instead of the Servers.
Did I miss anything?
What would you suggest?
Any help is appreciated!
Inspired by so-called Isomorphic Javascript or Universal Javascript, I suggest you to make the first rendering on server side; then when you update your page —using ajax— you make the rendering on client side. Doing so you would get the pros of both solutions:
a fast initial rendering of the page (no need to wait for the JS libraries to be loaded)
a reduced server load for following requests
an up-to-date user experience for edition

javascript/Jquery code organisation [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm creating a php app where almost all requests are in ajax and some Jquery effects, so some of my pages are up to 2000 lines of code, all my jquery in one big $document.ready{}, is it normal? should I be ashamed of showing this code to other developers? or is there a better way of organasing Jquery code ?
Like how many others have said, if it's maintainable and easy to read then it shouldn't be much of an issue. However, in my experiences, code that is organized into separate logical modules were MUCH easier to read and maintain than one long document.
With that being said, the typical workflow these days with tools such as browserify would be to refactor and separate the code such that each file executes a specific task for development purposes and when it is time to deploy to production, one would use a build tool to group/minify and optimize for the browser.

how to create a login page for a website using html, css, javascript and php & mysql as backend? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am new to web development. I want to develop the front page of my website through which users can enter their username and password and login to their accounts. How should I accomplish that?
You can try to make your own implementation but there are a lot of security risks to worry about. Particularly things like SQL Injection. There are frameworks you can use to implement login pages that take care of the security for you. You just need to find the one that works best for you. Zend Framework is one example of a PHP compatible framework that does authentication.
Here is a decent starting point if you really want to write your own log-in/out routines..
https://www.developphp.com/video/PHP/Log-In-Form-Log-Out-Script-Cookies-Sessions-User-Profile
All that is lacking on that page is the layout of the database.

Categories

Resources