Web application

Discussion in 'Web Design and Development' started by Schonert, Dec 5, 2011.

  1. Schonert macrumors newbie

    Joined:
    Nov 19, 2011
    Location:
    South Africa
    #1
    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!
     
  2. wHo_tHe macrumors regular

    Joined:
    Jan 2, 2002
    Location:
    :: sfbay.ca :: All bay, all day.
    #2
    PHP 5 has nice built-in functions for dealing with XML. Not a bad choice at all.

    Also look at JSON. A clean standard with growing support.

    Good luck!
     
  3. frocco macrumors 6502

    frocco

    Joined:
    Jan 27, 2009
    #3
    I use a php framework.

    Take a look at Codeigniter or yii

    I prefer the MVC method.
     
  4. Schonert thread starter macrumors newbie

    Joined:
    Nov 19, 2011
    Location:
    South Africa
    #4
    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?
     
  5. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #5
    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?
     
  6. bpaluzzi macrumors 6502a

    bpaluzzi

    Joined:
    Sep 2, 2010
    Location:
    London
    #6
    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.
     
  7. Schonert thread starter macrumors newbie

    Joined:
    Nov 19, 2011
    Location:
    South Africa
    #7
    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.

    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?
     
  8. bpaluzzi macrumors 6502a

    bpaluzzi

    Joined:
    Sep 2, 2010
    Location:
    London
    #8
    Agreed. It's an absolutely brilliant link.


    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.
     
  9. Schonert thread starter macrumors newbie

    Joined:
    Nov 19, 2011
    Location:
    South Africa
    #9
    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?
     

Share This Page