Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Schonert

macrumors newbie
Original poster
Nov 19, 2011
27
0
South Africa
Hey there.

I'm planning on creating a web application, but I'm not quite sure how to structure it. I've done a lot of HTML, CSS, php and JavaScript, so the layout part will not be a problem, but more how to structure the sites data manipulation. How it receives, sends and deals with the data, from the database. I've played around with php -> XML -> Ajax, for a more app feeling experience, and I'm considering going in that direction.

But before I go ahead and use a lot of time creating this app, i'd like to hear you guys what your approach would be. How you would choice to manipulate your data (receive, send and deal with data). If you have got some experience or advice you would like to share before I start, I would really appreciate it!
 
I use a php framework.

Take a look at Codeigniter or yii

I prefer the MVC method.
 
Great! Was afraid that php in web apps was outdated. One thing though. The application will store a lot of personal data, such as bank details and so on. Any tips on how to make the app as secure as possible?

Atm I'm considering requiring a session in the db_class, so that without the right session with the right value the db_class won't work. Any suggestion, things I would be aware off or any tips?
 
Great! Was afraid that php in web apps was outdated. One thing though. The application will store a lot of personal data, such as bank details and so on. Any tips on how to make the app as secure as possible?

Atm I'm considering requiring a session in the db_class, so that without the right session with the right value the db_class won't work. Any suggestion, things I would be aware off or any tips?

Read this question and all the answers for a detailed run down on what every web developer should know. It is one of the most comprehensive sources of information for new web developers.

What should every programmer know about web development?
 
Great! Was afraid that php in web apps was outdated. One thing though. The application will store a lot of personal data, such as bank details and so on. Any tips on how to make the app as secure as possible?

Atm I'm considering requiring a session in the db_class, so that without the right session with the right value the db_class won't work. Any suggestion, things I would be aware off or any tips?

If you are touching bank details, you need to get licensed as PCI compliant, a difficult and expensive task. I'd stay away from that, and instead use a third-party payment gateway that is set up solely to do that.

Sessions get tricky if you get in a position where you need to scale horizontally, so it's usually in your best interest to avoid them if possible.
 
Read this question and all the answers for a detailed run down on what every web developer should know. It is one of the most comprehensive sources of information for new web developers.

What should every programmer know about web development?

Cromulent.. That advice was soo helpful! I've been reading for hours now, and I've learned so much! I've got a much better understanding of security.

If you are touching bank details, you need to get licensed as PCI compliant, a difficult and expensive task. I'd stay away from that, and instead use a third-party payment gateway that is set up solely to do that.

Sessions get tricky if you get in a position where you need to scale horizontally, so it's usually in your best interest to avoid them if possible.

Bpaluzzi, you might be right there. The app won't be a public app, but an app that will store a lot of information about clients. When I say clients I mean costumers, people who the user is doing business with. So what there is going to be stored on the app, is not yet been decided. but the point was, will session be secure enough?

Could you explain what you mean with horizontally? Like array, or like a lot of information or?
 
Cromulent.. That advice was soo helpful! I've been reading for hours now, and I've learned so much! I've got a much better understanding of security.

Agreed. It's an absolutely brilliant link.


Could you explain what you mean with horizontally? Like array, or like a lot of information or?

Scaling horizontally is splitting the service across multiple machines -- using a load balancing front-end to distribute requests across the machines. It's improving performance by using parallelism.

To contract, scaling vertically involves making the single machine "beefier", giving it more RAM, a faster processor, etc.

In most cases, you'll scale your database server first vertically, then horizontally. A super-powered database server, loaded up with RAM, with an ultra-fast network connection to the web servers is one of the biggest improvements you can make. In contrast, web servers are relatively low-powered machines, and performance increases are gained by adding more machines. This is where sessions can cause issues -- you're not necessarily going to receive all subsequent requests on the same machine.
 
This is where sessions can cause issues -- you're not necessarily going to receive all subsequent requests on the same machine.

That makes good sense. That's a huge disadvantage. I might whant to consider an alternative. The best, and most common session mechanism would then be cookies? I just never like the idea of placing a key on the computer. What if my client really needs to check out the app for his business, he's out of town with no pc. He'll need to go to a net cafe, and place a key to all his business details, on that machine..

Now that security is out of the question, I've got another question. When developing the app, I'll need to find the best way to navigate around the app. For less reloading and for a better app feeling experience, I'm considering using jQuerys Ajax-get function. Build a singe page, and just use the Ajax-get function to get the different content pages loaded onto the page. The downside with that idea is that non of the content will be in the Dom, wich makes it hard to manipulate later on.. Any suggestions or alternatives?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.