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 6 years ago.
Improve this question
I made a NGO website that has customer service in it, means that clients are able to chat directly to the admin. I've built 30% of it with PHP. But, I thought it's difficult to make a chat application with PHP. I've been told that Node.js is the best web development to make chat application. Can I mix PHP with Node.js ?
Generally, people name files depending on what language the code inside is written in. For example, the .php extension is run by a PHP interpreter. Certain files can have other languages mixed in. For example, a .html file can contain CSS and Javascript. Another example is the .html.erb extension in a Rails app, which can contains both Ruby and HTML/CSS/JS code. This is accomplished by something known as a preprocessor.
You could use a preprocessor to mix mostly any language together, but I'm not sure that will make your life any easier making an app. It's probably a better idea to separate your app into microcomponents, which can all be written in different languages.
For example, a chat server could be written in Node and a REST API written in Rails. They might be hosted on separate servers and communicate with each other by sending HTTP requests.
As far as Node being "the best" for making a chat server, that's a totally subjective point and StackOverflow discourages opinion-based conjectures.
It's also worth considering whether an open-source chat project could be integrated with your existing code. I.e. something already made.
Related
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 5 years ago.
Improve this question
I'm wondering if it is possible to create a web application where a user can sign up,login, and make payments without using a framework like Rails or Node.js, but rather html,css,php,mysql etc.
Is this even possible?
Yes, it is entirely possible to write any web application without framework. Keep in mind that frameworks are also written in their respective programming languages - therefore, you can achieve same results without one, but it will be more time-consuming and will need more work to "reinvent the wheel". A framework usually delivers many useful functionalities that are ready to use, but in the exchange you must comply to its standards, semantics and rules.
Many programmers of high-end applications choose to develop without a framework, because they don't want to be bound by those boundaries. Also, there are performance reasons - if you can fine tailor your application to your business requirements, it will probably run faster.
Also, please keep in mind that Node.js isn't a framework - it is a toolset that allows running JavaScript applications in OS enviroment instead of the browser.
It will take a lot of time but it sure is possible. These 'frameworks' are here to speed things up for you. I recommend you to take a look at a couple of MVC frameworks. For example: Laravel, Codeigniter and Symfony. These frameworks will do a lot for you(Think about security and routing) but you still have to write the biggest part of the logic yourself.
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 2 years ago.
Improve this question
I have read many articles, forums and informations about SNMP.
Even though I struggle with my project.
The goal of my project is to display data that I get from SNMP on a web page. (Nice designed interface). SNMP protocol is compulsory. And it should run on linux server (I want to add more devices in a final part of project e.g. router, switch.)
Could anyone tell me some quick info what has to be done (step by step review)?
I would be glad for every help. I am confused about what is the best way.
Ajax/database/websockets/traps?
I would like to use PHP or Node.js if it possible.
I'm doing a similar project for my internship :
I'm using Perl script for back-end with Net::SNMP for snmp request,
Perl CGI for front-end,
and JSON for DB.
I suggest using a framework to create the web interface, for example Django (https://www.djangoproject.com/) in python.
Then you could use a python library (pysnmp will be great) to retrieve the SNMP data, and create a custom View to show this data in a web page.
If you want to stick with PHP, you can use the functions described here http://php.net/manual/en/ref.snmp.php to access the SNMP server, and again using a framework will be great (Laravel, Symfony ...)
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
Couldn't find anything about this online so I'm giving it a try here. (Not sure what to look for in google so maybe that's why I couldn't find it).
My client wants (for some strange reason) a dynamic, pure HTML5-website with no PHP at all. The webpages can be created with PHP, but after he is done, he wants it to (automatically) generate HTML5-webpages so these can be put online on a server with no PHP.
Is this at all even possible? Writing an API myself that gets the content from the server and converts it to HTML5 is not really an option due to time ...
Thanks
FYI: If what you want is a Single Page Application, you're asking the wrong question.
Seems like what your client wants is a pure HTML site because he might have the idea that pure HTML sites are better for SEO.
What do to?
Alternative 1:
Create a different server to generate pages. Either local (with vagrant) or in another remote server. Have your content generated there by using a CMS of your choice.
Periodically generate a mirror of your site using a tool like HTTrack or wget. Hand this mirror to your client.
Alternative 2:
Use a static site generator like Jekyll. Have the server run a cron task to automatically generate HTML from the changes.
Alternative 3:
Be the expert and explain to him that his ideas are probably unfounded.
Yes, you could use the HTML5 Filesystem API and Javascript to read/write from a JSON file as a backend. It's definitely not ideal, but it would satisfy your requirements.
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 9 years ago.
Improve this question
I've been coding with django for a few months now, and I have made good progress. But, I feel like I don't understand what's happening under the hood well enough to make the leap from beginner to advanced. For example, it's easy to manipulate the database via ORM in Django without having any knowledge of SQL. As another example, user authentication in Django almost only requires me to import a module and writing a couple of lines of code. I don't have to have any knowledge on sessions, database queries etc.
As I have done no prior web programming except Django, I was wondering if it would make sense to move to PHP (without a framework) and when I've learned the fundamental concepts of web development (cookies, sessions, SQL etc) return to Django development?
No, that wouldn't make any sense at all.
PHP is just one language for writing websites. It works in a certain way, but many of the things that you often see in PHP are not generally considered best practice. It's very unlikely to help you write a decent Python web app.
If you really want to learn how everything works, you could just as easily write a Python app using raw WSGI, or a micro-framework like Flask.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I do quite large project for a client and I would like (somehow) to secure code form event that mid dishonest client was not going to pay me for the work. :)
The contract is written that the project must provide application with a sources.
So far I mostly been writing in .NET where I was protecting myself against such an eventuality in way that I was creating class witch get POST some parameters with shutdown application. This class was thrown into a dll witch was already compiled, so no one could change the source.
Is there a similar possibility in PHP? I can do the same thing (as in .NET case) but clever customers with access to PHP can find above class and I just cut it.
Maybe it is some other way to secure myself?
Suturing of the database also eliminated for similar reasons as above.
PHP is an interpreted language; as a result, it doesn't compile your code. Your best bet is to stick with .NET, where you can compile the functional part of the application into a .dll, or use Java and compile it into a bytecode.
PHP wasn't built for compiling.
What you can do is probably host the application on your server till the client has made a payment, and then upload it to the client's server.
Or you can make it downloadable from your server (only after payment), along with configuration scripts that is configurable by anyone with a few clicks of the button; something similar to the way some of the PHP frameworks (e.g. WordPress) work.
You can protect your code with Zend Guard (http://www.zend.com/en/products/guard/).