Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Resources to learn languages


  • Lynda.com - Free to all McCombs students
  • Udemy.com - Signup for an account and see many classes go on sale.  Great way to learn web development (recommend Rob Percival's "Complete Web Developer" course).
  • W3School - perfect site for beginners to learn HTML/CSS/JavaScript/Bootstrap
  • TheNewBoston
  • CodingBat
  • CodeAcademy

LAMP Stack development

  • For local development download XAMPP (for Mac) or WAMP (for PC)

    • This comes with an Apache server, MySQL database, and a FTP client. Drop all your php files into the htdocs folder in C:/xampp, start up your apache server in the xampp control panel, then open a browser to navigate to localhost:[portnumber]/url to see your php renderings.
    • You can choose to download a separate MySQL onto your computer if you wish. After installation, navigate to C:/Program Files/MySQL/MySQL Server [5.7]/bin. Use the following command to access the database: mysql -u [username] -p (-h [host ip] if you are accessing a remote mysql database)
    • Create reasonable modules. PHP lets you break down code into smaller segments and join them together to render a complete page. Make your code shorter so it's easier to maintain and make changes. For example, you can create a header.php with the common header every page shares, then you can simply use the <?php include header.php ?> in every other page to re-use the code you've written.
    • Download XAMPP control panel
    • MySQL server
    • PHP modulation
  • Best practices

    • Keep that in a central file, so you don't have to write a connection string every time a page needs to be linked up to the database.
    • You can use objects in PHP-- OOP makes your complex logic so much easier to organize.
    • Keep your files stored in proper folders. Your css files should be in a folder called "assets", images should be in a folder called "images", shared files like connection string, headers, footers should be put in "includes" folder.
    • This is something that a lot of people overlook. Improper php code is especially vulnerable to common attacks such as cross site scripting, cross site request forgery, and sql injections. To do the best job we can here are some tips:
      • Escape all user inputs
      • Users may enter data that gets executed as part of the query, but if they enter say in the username field - john'; drop table tblUsers;. The query that now gets executed may look like SELECT * FROM tblUsers where username = 'john';drop table tblUsers';. The solution here is to use the built in real_escape_string([input]) to sanitize all user inputs. (Google it for details)
      • Use HTTPS if you can
      • Not all clients will support this, but ask if they can get a HTTPS connection. This will encrypt the communication between clients and the server.
      • Don't store your passwords in PLAINTEXT
      • If you are making a log in page, please store only the hashes of the passwords. When the user logs in you should hash their input and compare it with the hash you stored in the database. Further, md5 and sha1 are not safe hashes and are being phased out, for industry standard hashes use sha-256 and above [This is done very easily in php, simply use hash("sha256", STRING) function]. Finally, using randomly generated salts for each user is also standard practice. Read the Wikipedia page for an overview as to why it is important : https://en.wikipedia.org/wiki/Salt_(cryptography) 
  • Deployment

    • FTP/FTPS - Use a FTP client (Filezilla, WinSCP) to copy all your php files to the designated server with proper credentials.
  • Other Insights/Tips
    • Phpstorm and Jetbrain IDEs for free - Jetbrains, the maker of IntelliJ IDEA Java IDE (which powers Android Studio) and other IDEs, offers free licenses for students with a .edu email address. One of these IDEs, Phpstorm, can prove very useful to 374 teams building web applications with Php, Javascript, and HTML/CSS. With early warning on coding errors, git/svn integration, and FTP/SFTP deployment, Phpstorm is a great tool. Student can get it at https://www.jetbrains.com/student/ 
    • Use MAMP to run PHP and MySQL server locally. MAMP, free of charge and runs on both Mac and Windows, installs a local server environment and allows you to have access to a local PHP server and MySQL server. Instead of using the online code editor, a local PHP server given through MAMP will give you more flexibility and control over your code and development environment.

Email notifications in PHP - Click here for more details on how to setup email notifcations in PHP

Javascript

For RESTful applications, Postman offers free input/output testing for all your application’s end-points.  It will also come with in-depth documentation on how to use your backend end-points if needed for technical clients.

  • No labels