In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
What is ThinkSNS+?
In 2009, ThinkSNS was developed by a team in Beijing to enter the social open source industry. There have been a lot of clients over the years. 2014-2016, two years before the maintenance and development of TP-based ThinkSNS, slowly introducing new development concepts. Finally, in the second half of 2016, we decided to rewrite the program and discard every previous line of code. In the framework, the developers consistently chose Laravel and chose a name that looks like a mobile phone manufacturer named it-ThinkSNS Plus. Yes, it is Plus, that is, symbol + because we prefer to focus on the mobile side, which is ThinkSNS+.
How to keep upgrading with Laravel
At first I didn't think about the framework upgrade, then I thought about a question, will it end up like the previous version? Is the framework difficult to upgrade? So we decided to merge a pair of master branches of laravel/laravel every week, and in order to show respect for Taylor Otwell and Laravel contributors, each commit was retained when merging.
Open source agreement
Because Laravel itself is a MIT protocol, based on Laravel development, we also hope that ThinkSNS+ can contribute to the open source community, so the code does not use a private protocol, but chose the Apache-2.0 protocol for open source.
Front-end workflow
This is a difficult problem to choose. We hope to fit the built-in Laravel-Mix, and also hope to build a more suitable application scenario. Finally, we choose to give up Laravel-Mix to do the front-end build, which leads to a new problem. We also hope to work seamlessly with the mix helper function. After reading the source code, we find that the problem is too simple. It's just a mix-manifest.json thing. But this thing is full of twists and turns.
At first, we chose to do the generation function in webpack.config.babel.js, together with the third-party package implementation, the function was implemented. But what if you also want to use the expansion package access? Finally, the front-end package webpack-laravel-mix-manifest is developed to generate the file.
Expanding design
First choice, there are currently two extension designs, namely plus-component and plus-plugin, which are actually implemented by Composer intermediate plug-ins.
Composer plug-in zhiyicx/plus-install-plugin
Plus-component
In fact, this design only wants to expand the package to quickly access the basic development of the routing template data model, and it is also the only way to expand the intermediate plug-in version 1.0, which has existed for as long as half a year. Can quickly write routing, controller, data model, the current application expansion of our team is developed and implemented in this way.
And encapsulate the php artisan component command installation.
Plus-plugin
This is a very young type in the composer plug-in version 1.1 added, the principle of this extension is very simple, in fact, Laravel Service Provider, familiar with Laravel development know, this service facade is called "Laravel extension" but the installation is not convenient, need to first composer require vendor/name, and then in the app.php providers field configuration, and then run the command to generate configuration files.
Considering that ThinkSNS+ is for webmasters, entrepreneurs, enterprise groups and other users, let them change the code? I might as well kill them. So, came up with an idea, how to automate this step? So that users only need composer require vendor/name to finish it? Moreover, for the use of broadcast systems, for example, such a thing is needed to facilitate development and expansion. So I figured out a way to finish this step in the composer require step, and this pattern was developed.
The Laravel extension cannot be used directly in this way, because the idea of doing this is to hand over the configuration to the background configuration.
Interface and SPA
Interface, REST ful is not fully considered in the initial stage, so you can see that URL naming is very similar to the REST ful specification, but the actual data is not, and then gradually normalized.
The API interface is mentioned here, which means that we have abandoned the traditional web page. The core of ThinkSNS+ is a user center, and then all the functions are implemented by extension. At present, the backstage and mobile end are developed in the form of SPA call interface.
Open the source code repository:
GitHub: https://github.com/zhiyicx/thinksns-plus (click star to follow developments on a daily basis. )
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.