Languages / stacks for deployment [closed] - php

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 8 years ago.
Improve this question
I'm working on a rather intensive rewrite and given a choice of the following options:
JSP / Java running on Tomcat
PHP running under Apache
Ruby (running under I'm not sure, ROR?)
A couple of basic questions I would like to know about the above.
Speed is a concern. We have a MongoDB backed database, so we shouldn't need to be waiting on the database for information, but the frontend needs to be as fast as possible. The common saying speed isn't a concern doesn't really apply here. If you're processing 500k+ objects in one request it needs to be fast.
Scalability is another concern. Suppose our database blossoms out of control. Which (of the above) would provide the easiest method of handling this?
What are common downsides of Tomcat / JSP and Ruby? Is parallel processing easy to do with PHP or Ruby?
The goal is not to save money but to build a solid, fast, scalable system to continue development on for years to come.
I'll be honest, I'm a former Java developer (not JSP) turned PHP developer. My preference for anything is PHP but I also am a big believe in using the right tool for the job. The team is competent enough to write this is anything that we

Seems like any of them would be acceptable based on the limited info so far. The important things I've begun to consider when launching new projects are more about the ORM and framework than about speed. For every extra 40 hours of developer time I have to spend on a project I can provision and operate a new server for 1 year.
If you have developers that are better versed in the APIs for a particular language, that alone could (potentially) make your decision. If you can parallelize 500k things across 10 servers, and choosing language (and API/libraries) A over B will save you 10 weeks, then that is your breakeven point. Similarly, if one set of things is 2x as slow, and having 2 servers instead of 1 could double your processing speed, then it will only take 1 week of extra fighting in the "faster" language before all your performance gains are wiped out due to longer development time...

Ended up going with Play!
Reasons:
Quick startup
No redeploying / packaging
Straight forward MVC pattern
Groovy template / inherited views
Drop-in support for dependencies as JAR files
Development was never hindered by it. No one had to learn anything new besides where to put the controllers / models / views.

Related

Possible to create web app without a framework? [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 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.

Create a website with or without a framework like TYPO3? [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 hope my question fits in stackoverflow, let me explain my problem:
I am using to program websites in Java, Javascript, HTML, CSS and SQL in Eclipse for about 2 years. Now I want to create (alone) a pretty big community website in PHP (this program language is pretty new for me). In this context, I found the framework TYPO3 and try to learn it. After all I must say, that it seems very complicated to me and I can´t find the advantage over programming files strict in an normal editor without TYPO3. I'm in an inner conflict about whether this would be good or bad for my intention to create the website. I can´t find the benefits, but I often read, that they exist. Is Typo3 (or another framework for PHP) worth learning when you already have programming experience?
Note: Your question doesn't meet StackOverflow's requirements as it can produce many equally valid answers, here's my opinion from point of view of long term TYPO3 developer:
TYPO3 is great, well known, stable tool (btw. it's a CMS, not a framework) used for building thousand of sites of different size - from small product pages to big corporate portals. It brings lot of useful techniques and technologies just out-of-the-box, login forms, contact forms, user permissions, ready to use galleries, extensions, etc, etc... so you don't need to touch every single aspect of the web-programming as you get it just right after installing the system. It does matter especially when you are gonna to work alone - when you physically won't be able to concentrate on every aspect in any sensible time. For sure you'll get benefits using it instead writing it yourself - especially with your relatively short overall experience.
But is it best choice for your needs? I don't know, nobody can know it without analyzing your concept. TYPO3 may be to heavy for the task, it's the price for its flexibility, maybe you will need to use some faster framework, i.e. (TYPO3) Flow Framework (PHP, Framework for TYPO3's originally intended successor Neos CMS), Symfony (PHP) or Play Framework (Java) which also gives you great starting point, but requires more work on every element, maybe...
The only way to determine the valid path is to compare solutions yourself or order such a comparison from a qualified agency.
Laravel 5 is my favorite PHP framework. When you do understand this framework, it's so easy to manipulate routing (url), mysql logic, security, etc. I use it for every project with PHP. Try it, there's ton of tutorial out there!

App Performance on Raspberry Pi vs multi Xeon core server [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 8 years ago.
Improve this question
I am developing an App on a Raspberry Pi using PHP and mySQL. After couple of weeks of development I have noticed that in some cases the App runs slow and then I try to optimise the code related (e.g. too many loops within loops, or loading of static images dynamically is really slow on RPi). Usually the slow-downs would not be felt at all on a more powerful hardware, but I decided that those slowdowns would be noticeable when the server hardware resources are maxed-out.
The question:
Would the application performance optimisations on a Raspberry Pi allow me to achieve better results on a multi-code multi-socket Xeon server later? e.g. would I be able to reach more hits per second before maxing out the hardware resources when I take this approach by developing my App on a less powerful hardware? Or is it just a waste of time and the performance gains are not worth it?
I am asking this because the architecture of RPi and Xeon is very different and whatever I am doing might be a waste of time. As I do not have a Xeon server at the moment, I am not able to compare and prove my point above at all. :)
Thank you!
It depends upon what type of optimizations you are doing. Portability across different hardware all comes down to the architectural independences of the abstractions you are using (e.g. language, compiler, libraries). My understanding of PHP is that it works at a very high level as an interpreter intended to be as portable as possible. So it is already abstracted from the hardware.
My guess is that your optimizations will carry across to the Xeon. I figure you're doing algorithmic and code optimizations, such as researching better methods of doing something, replacing loops with more efficient code, using better data structures, and getting rid of unnecessary and redundant calls. All that will help on any machine.

What's the rationale behind the claim "PHP doesn't scale up (well)"? [closed]

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 11 years ago.
Improve this question
I've recently picked up PHP and it seems rather neat language enabling very quick web application development (probably faster than my personal favorite - Java :)
Now, I'm no PHP expert - neither with the language nor its internals/specifics. But quite a few of my peers have made the claim that PHP applications don't scale up well - a fact that I've not been able to figure out for myself and hence the question.
I've just learnt the procedural flavor of PHP and my only guess of non-scalability is that of scalability of procedural vs. OO languages (C vs. C++/Java). I agree and and I can see how that would be a hurdle for extremely complex web applications. However, I'm aware of OO-ness coming to the PHP world and don't see that to be much of a hurdle (please correct me if my hypothesis is incorrect).
Other than that I don't understand what scalability problems would arise for a web application with a large number of users (for the sake of discussion, let's assume a Restful design - no sessions - since I am aware of how that impedes scalability). I'm more interested in knowing 'objective' reasons for such a claim, if possible. Subjectivity is fine but I'm not here to start a debate as to PHP vs. everything else. I'm only interested in knowing what are the potential limitations of this language that I must keep in mind and should not bite me in the behind later if/when the web application were to have 1000's of users a day (or hour).
I can't think of a language that has a scalability limitation. A scalability limitation for a language would be something like:
Language X can't be used to write programs that require more than
1000 lines of code.
That sounds ridiculous, and it is.
The stigma that PHP applications don't scale well comes from the fact that many inexperienced programmers choose PHP for their web applications. This is because PHP is an easy language to learn, integrates extremely well with Apache, and is supported on nearly every host in the world.
Inexperienced programmers will often use bad practices when writing code. Given enough of these bad practices littered throughout the web, written in the inexperienced programmer's favorite language, it's easy to see why some people are averse to PHP.
There's also, probably, a "holier-than-thou" attitude that some programmers have toward PHP (again, because of its simplicity).
PHP scales just as well as any other language when page caching and best practices are taken into account. There are plenty of well-used PHP projects to prove it.

Best Android backend for turn-based game? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I was wondering if anyone had any good suggestions for the best backend for an android app with play similar to words with friends. Very turn based, sometimes over multiple days.
The first solution that pops into my head is simple PHP/SQL with responses in JSON as it would be quite easy to implement. Although i am just wondering if anyone has any experience with this and can tell me if it has any big down sides. e.g. Poor scaling, few concurrent users, etc.
Is PHP/SQL a good solution? Should i be looking more at a Java server using TCP/IP? Even for these bursts of messages?
Thanks!
I've used both smartFox socket server (quite awhile ago) and PHP/MySQL to handle "multiplayer state synching" on the web (recently)
In my opinion, for a game that's going to have turns that may span days, a database system would be better. A socket server would have to maintain data in memory that may not be in use for hours or days. PHP/MySQL(or SQL) + JSON would probably be a really good fit. Large PHP sites serve pages to thousands of users and may execute multiple queries per page render so I think scaling should be fine.
The advantage of using a database system is that it can be platform agnostic. Your Android game could run on iOS et al via something like PhoneGap.
EDIT: The disadvantage of a database system is Push notification might be harder to rig up. That's out of my realm of expertise.
I would do exactly what you suggested. It doesn't need to be PHP, but basically you will have a web server (could be nginx, apache, etc), and it can be in any language you want.
One of my favorite methods is using a Django MVC setup, using Python on the backend (for awesomeness of Python) and communicate using an HttpClient (or Https even).
I used JSON as the go between (started with XML, but changed to Json as it's lower overhead usually).
You'll probably also want some kind of a PUSH system set up. Either using C2DM, or a third party API. There's an API I used mostly because it was free & pre-C2DM, called Xtify. It's designed to be used as a geolocation tool, but it has PUSH services (and you don't need to use the Geo stuff). Best part, it's free!
That way, you can have the app open, but not wasting battery life with a POLL loop, and just get when the other player's turns end instantaneously.
EDIT: I just looked and it appears that Xtify charges for anything over 300 messages per user per month... so that's probably not the best option for PUSH services anymore.

Categories