当前位置:网站首页>In order to save money, I learned PHP in one day!

In order to save money, I learned PHP in one day!

2020-11-06 01:17:40 Bugstack wormhole stack

author : Little brother Fu
Blog :https://bugstack.cn

precipitation 、 Share 、 grow up , Let yourself and others have something to gain !

One 、 Preface

Are you on your way to the architect ?

The programmer industry seems to be constantly upgrading , Break through the bottleneck period of each stage .

I want to get it through internship before graduation offer、 After graduation, I want to pass the probation period to become a regular 、 After becoming a regular programmer wants to achieve advanced development 、 From the high level, the developer wants to be an architect 、 From the architect to a higher director or CTO. The road ahead is more and more difficult , Both need individual continuous precipitation learning , It also needs opportunities .

On this route, the architect is an important turning point in the bottleneck period , Because this stage is far more than personal technology stack learning , There are many other abilities , Almost can include the following points ;

  1. Experience in large and medium-sized project development and implementation
  2. Reliable delivery quality and overall planning ability
  3. Can solve the complex project architecture design and promote the implementation
  4. It has a certain technical breadth and depth , It's changed bug, Handled the accident
  5. The standard has been set 、 The architecture is designed
  6. There is a certain range of cognition , Familiar with the business 、 Products and operations , Understand operational planning and business development
  7. I can bring the team , Promote project implementation and technical growth within the group
  8. Have a certain professional influence , Can use technology to create value
  9. Ability to deal with emergencies
  10. Process specification development 、 methodology 、 Experience in open source projects

A technical architect may require more than these ten points , There is also a lot of soft power . But it's hard to learn through training or classes , Because these abilities are all practical experience , It takes a long time .

In fact, even if there is no architect, there is no lack of system architecture , Such a team doesn't need to have an architect , Many of them are complete sets of rapid construction technology , Especially like SpringBoot A complete set of services , Very suitable for small companies .

But if you have a very complex system architecture and business scenario design , It includes the development of grouping arrangement for dozens of systems , Providing support for millions of QPS、 There are tens of thousands of seckilling activities in an instant 、 And the need to expand as the business grows to support millions DAU The backstage service . It requires the architect to control the whole , Because he can order from 、 To deal 、 To pay 、 To settle accounts 、 To the event 、 To play , How to support it 、 How to design , Provide a complete set of solutions , So this system of volume complexity , It's not that a small workshop team can take on .

Two 、 Closed loop learning of technology stack

Is your technical capability sufficient to support the whole system ?

 Little brother Fu , Technology closed loop

In fact, a lot of programmers ‍ Most of them are limited to the product PRD in , Besides, I don't know much about the whole situation . And it's only within the scope of technology that is also limited to a certain language , For example, the basic development of back-end R & D can not produce a complete front-end page 、 Front end students also can not write back-end interface .

Of course, deep penetration is not necessarily a bad thing in a certain technical language , There may even be some creation and achievements . It's just a lack of global awareness and understanding , In some cases, it will be limited to a bottleneck period , It's hard to grow to the next stage .

Or more simply , Can you build a tech blog with your skills , And run it . If you haven't done it , So from you start to finish, you'll find out . You need more than that java, also UI Design , There are also front-end pages , There are servers and other technologies to support . meanwhile , You will choose for some time java Or other languages , Because the server of personal blog also has to pay ,java Servers are usually more expensive .

therefore , If you want to do something for yourself in the future , Don't just be limited to one technology , And don't be limited to one area . Understanding the business Familiar with operation , Also try to learn UI, The learning of this knowledge is far more reliable than waste .

3、 ... and 、 My troubled growing experience

Be reasonable , In fact, I am a programmer who loves to toss and turn , Of course, I love to toss about other things , Especially for invention and creation .

When I was a child, I would tear down a lot of things , Take the motor and other small things inside , Making some toys . such as ; Electric boats that can be launched 、 A small ice car that can skate 、 There are also some lazy tools and so on .

With this kind of personality to learn programming is also like this , From the beginning of learning programming, I want to make my own website . From only one html I started buying domain names 、 Keep on record 、 Online website 、 loading b Share , This set of combination boxing began to toss until now . Until now there is a stable technology blog site bugstack.cn . These let me learn a lot of extra knowledge , It also expanded a lot of black skills .

1. I have a blog drain

If you have a flow still can Technology blogs , Another official account has been applied. , Want to make official account. . Then what would you do ?

You don't want to find a prominent area in the tech blog , Place a official account for two-dimensional code. ? But in fact, this way will not attract too many people's attention , From the more popular words now , The interest of users will not be affected if they pay attention to it or not .

therefore , What we want is to ensure the user experience , As far as possible to guide users to take the initiative to pay attention to . Then the best way is to remind users to pay attention when reading articles , If you don't pay attention, you can only read the article 30% Content , Pay attention to read the full text . It's like this , as follows ;

 Little brother Fu , Blog drainage

The end result of this effect is that the user is reading the article , It can guide users to pay attention to the official account and send the specified encoding to unlock. , Allow users to read after unlocking , The process is as follows ;

 Little brother Fu , Technical flow chart

2. How much does it cost to drain ?

 Little brother Fu , Server cost

This is the use of Java Language , Developing a blog to drain official account numbers to public service , Approximate cost of one year . Of course, the prices and activities of different cloud service providers are slightly different , But at the average price per year , Probably in 1800.00 yuan .

It's not too expensive , But in the whole cost accounting service , Such investment is quite high . Unless your official account can offset this part of your investment. , And there are some benefits, so it's OK . In addition, we have not calculated the labor input here , Yes Master It's the man of many roles : product + Research and development + Vision + Business + operating = Master !

Maybe you don't know ,Java The service is more expensive , But there are also php The server is cheap , What's the price difference ? With php For example, the virtual machine of , What's the price for a year 198 element . And this php Virtual machines also include 1G Database resources , And java It's really cheaper to compare servers .

therefore , choice php Developing the official account and the backend service that blogs have got through. , It seems very suitable .

3. Use PHP build DDD Four layers architecture

I taught myself many years ago PHP, Thanks to that sentence :”php It's the best language in the world !“.

Because I love to toss and turn on this learning road , therefore C++、C#、PHP、PLC、 Repeaters have also been developed . But I didn't use it for a long time, so I forgot 7788 了 , But in order to save money, I spent a day PHP also Learned to

In fact, I have some programming experience , There is a certain similarity between languages . You just do what you want , Any language will provide you with the corresponding implementation , I do not know! ? Just search ! Like this one below PHP Four layer architecture of Domain Driven Design Based on , And Java Very similar . as follows ;

 Little brother Fu ,PHP And Domain Driven Design

Cough , I don't choose to use it here php Some of the frameworks for , for example thinkphp、laravel etc. . After all, the framework for me develops a official account's back-end service. , Still a little heavy . According to my logic , Building a DDD The four tier architecture is implemented according to me Java The way to achieve PHP The code can be . It will also be very fast , In the end, it only cost 1 The entire service will be completed and deployed in days . This includes ; Code development 、 Database configuration 、 Service online 、 Interface switching 、SSL、 Cross domain etc. . therefore , I always want to say, don't just be a tool man , It needs to be laid more comprehensively !

Example , Let's show you what we have now PHP And Java Does it look similar? ;

  1. Define method name with function,public function entry()
  2. Constructors public function __construct(), You can initialize some information
  3. String concatenated with dots ,$openId . "_" . $token
  4. For interface interface Definition ,interface LogicFilter
  5. Class introduction package ,require_once
  6. Pointer for method call ,$this->msgEngineHandle->process($behaviorMatter);
  7. Database connection ,new mysqli()
  8. Defining attributes ,var $openId;
  9. Get the input parameters ,$_GET['token']
  10. The output results are fed back to the interface ,echo

… wait , There are still a lot of it . All your logical implementations are as long as they are in Java It's OK in there ,PHP There is also corresponding support . This is the norm of language construction , In some cases, the nomenclature is uniform .

Four 、 summary

  1. This is where I am 10.1 The last day of the holiday , hold Java The official account of language development , Switch to PHP The experience of . But the structure of the code has not changed , It's still what I like DDD Domain-driven design . The important thing is to save money !, Here's another one Java Version official account background development .Java edition DDD Four layers architecture , Developing official account server
  2. If you want to be yourself , It's not just programming PRD Tool man . Then we must vigorously lay our own technology stack and other development capabilities not only for R & D . When you really understand the business 、 operating 、 After the product , I believe you can write code that is more in line with the market . At the same time, these soft skills , It can help you move up the ladder !
  3. A good car doesn't make a sound on the road 、 It's only when a broken car is on the road ! No matter what line of work you are in or in which direction , Can be quietly adhere to . Can walk on the same road for a long time , It's more important than thinking about changing directions every day . Don't be a simple man , come on. !
  4. by the way , It's advertising ;
    • 15 year , Meeting Netty You can go to the big factory
    • 16 year , You can go to big factories if you know distributed development
    • 17 year , Familiar with Dubbo Source code can go to big factories
    • 18 year , If you can write middleware, you can go to large factories
    • 19 year , If you know the algorithm, you can go to the big factory
    • 20 year , On bugstack.cn Study , You can go to Xianghe factory

5、 ... and 、 Series recommendation

( Please indicate the author and source of this article WeChat official account :bugstack Wormhole stack | author : Little brother Fu

Show Disqus Comments

版权声明
本文为[Bugstack wormhole stack]所创,转载请带上原文链接,感谢