如何成为python全栈工程师

原文链接
How do I become a full stack Python developer?

Mike Sparr, CTO at ClientHub (2017-present)

Plan on many years of continual learning and refining your knowledge and skills - yes, years or possibly a lifetime as most commit. I would define “full stack” as able to write a program with a user interface that also interacts with a backing service or database. Technically you could create a command line interface, and use an in-memory “database” (i.e. an array), and qualify. Most likely, however, you are referring to a modern browser-based web application that presents dynamic content to a user from a database and accepts and stores user input, or logs user activity.

You will need ultimately need to learn requirements gathering, documentation, user interface design, graphic design, database design, database indexing and querying/optimization, application interface design, systems administration, server configuration and management, web server installation and configuration, application server installation and configuration, internet architecture (http, tcp), networking (basic), dns (basic), software deployment, version control, and of course know python programming, html, CSS, templating, and JavaScript.

You will probably need other soft skills like marketing (to attract customers, users, or team members), contract negotiation, project planning, project management and reporting, risk mitigation and planning, UX (customer discovery, empathy, …) etc.

If you are just learning, you can probably ignore many architectural and non-functional concerns for performance scaling, caching, sticky sessions, tracing, localization, security, maintenance, etc. until you can build apps proficiently. For now you can ignore data structures and algorithms as well. Eventually you will need to know them too.

Pick some interesting project or problem to solve - the best way is to choose a problem you want to solve that requires a database-driven web app. A distributed shopping list is a decent starter idea. A distributed contact database, a shared music/media collection, a registration for events, or a 2-way chat with user login and history perhaps.
Sketch a sitemap (hierarchical list) of screens the user will interact with - you will need to decide how the user interacts with your program, in order to determine what pieces are needed. Do you require a login? Registration? Lost password? Public vs private pages? Mobile vs desktop vs tablet? Graphics or media?
Define a data model - based on the screens you listed, you need to figure out where the data comes from, or where it is saved, and its structure. Login may require a list of users with username and password, for example. The content on the screens is either hard-coded (part of your written code) or it’s dynamic, and you just write placeholders for the content that will come from elsewhere (i.e. database).
Define application interfaces - based on your design, you should be able to define your functions like login, logout, register, getListByType, getItemById, saveItem, deleteItem, etc. You should define the fields of data sent to and received from these interfaces. Login may require a username and password and returns true or false perhaps. Register may require a name, email, password and returns an Object with a generated ID (or nothing).
Setup your development environment - choose a text editor, a folder to store your project, and plan for the files you will create and consistent naming. Make sure you can execute python code, and know how to install external modules (using pip or similar package manager). Make sure you choose a database (e.g. MySQL or Mongo) and install it or can access it wherever it resides.
Choose your tools and libraries - you need to pick a database, and then will know what necessary drivers or modules are needed to talk to it. Learn the API of the library. You will need to serve your program and listen for HTTP requests so install a library like Flask. Learn its API as well. Later you will want to learn how to reverse proxy requests to your app from a front end web server like Apache or Nginx or a load balancer like haproxy, but you can start simple.
Build a single “slice” of your app to connect a web page to app server to database - there is little point rushing into building your entire app until you know how to fit it all together. Create a database with test table or collection/index and save a record. Create a simple hello web page that will display some value from your database, then the app that will render the page, then the code that will talk to the database to deliver the data to your app. Get this working first and make sure you see data from the database on the screen. Change the data in the database and confirm it changes when you refresh your screen.
Factor your prototype - you want to have a separate file to interact with the database and just expose functions to fetch and store data, and a separate file to handle the web server requests and generate HTML markup read by the browser. Eventually you will want to separate your markup and views and either make API calls to the server, or use a templating engine to “inject” dynamic content into the page placeholders.
Build your app - using what you learned and built thus far, finish your database, duplicate the prototype components and write your application. Be sure to add comments in your code to explain how your program works, and have fun.
Share your program on Github, and solicit feedback and improve it. Build many more useful apps and do the same. The best way to become a good programmer is to write a lot of programs, and solicit feedback and review others’ code to learn and refine techniques. Keep studying more in each discipline above to improve your skills in front end and back end development and design, data modeling and more. Try new things and as you get better, give back to the open source community by participating in projects.
As you can see, it won’t happen overnight, but hopefully this is a decent roadmap for you to get there.

Useful comments:
Here is a path one can follow:

Learn basics of Python from any book or online source.
Write some basic command line programs using Python. This will help you later in automating things as a full stack developer.
Learn a web framework like Django or Flask. Both are powered by Python.
Learn fundamental web technologies HTML, CSS and a little bit of JavaScript.
(Optional) Learn bootstrap if you are not very good with basic HTML and CSS.
Learn Git for code management.
Learn Heroku so as to deploy your Django apps onto the internet. There are obviously others like AWS, Google cloud and all but I’ve found Heroku to be the easiest to start with.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值