代碼流星雨是什么形式
Meteor, an allegedly dead development platform, is still alive and can bring massive value to your everyday coding experience.
Meteor,據稱已失效的開發平臺,仍然有效,可以為您的日常編碼體驗帶來巨大的價值。
Meteor appeared at the beginning of 2012, rocking the web development world. The possibility of bridging the gap between the server and client sides of a particular website or web app was genuinely tempting.
流星出現在2012年初,震驚了Web開發世界。 彌合特定網站或Web應用程序的服務器端與客戶端之間的鴻溝的可能性確實誘人。
Many experts thought that this capability alone should have turned the platform into a mainstream industry standard. Nevertheless, eight years later, many people claim that Meteor is dead.
許多專家認為,僅憑此功能,該平臺就應已成為主流行業標準。 然而,八年后,許多人聲稱流星已經死了。
Is that so? And is there any rational justification for learning Meteor? This article will give you a definitive answer.
是這樣嗎? 學習流星有合理的理由嗎? 本文將為您提供明確的答案。
流星死了! 流星萬歲! (Meteor is Dead! Long Live Meteor!)
Many developers believe that Meteor is dead. The popular explanation is simple: being introduced in 2012, it already had a promising set of features in 2015 but failed to extend them significantly.
許多開發人員認為流星已經死了。 流行的解釋很簡單:該功能于2012年推出,在2015年已經具備了令人鼓舞的功能,但未能對其進行重大擴展。
Some of you might have even heard of the problems with the funding of the development team, too. For many people, this fact alone is enough to forget about the platform once and for all.
你們中有些人甚至可能已經聽說過開發團隊的資金存在問題。 對于許多人而言,僅此事實就足以一勞永逸地忘記該平臺。
However, the reality is much more optimistic than it may seem. Today, the developers of Meteor receive stable funding from Tiny, one of the most reliable investment funds in IT. The version history also shows that the development platform is far from being dead, with the most recent iterations having a proud 1.10.1 designation released in February 2020.
但是,現實比看起來要樂觀得多。 如今,Meteor的開發人員從Tiny(這是最可靠的IT投資基金之一)獲得穩定的資金。 版本歷史還表明,開發平臺還遠未結束,最新的迭代版本于2020年2月發布,引以為傲的1.10.1命名。
Thus, if you have always secretly liked Meteor but were afraid to choose the platform due to the constant reports of it being dead, now is the perfect opportunity to hop onto the hype train.
因此,如果您一直暗中喜歡Meteor,但由于不斷有報道稱它已死而又害怕選擇該平臺,那么現在是跳上炒作的絕佳機會。
The reports of Meteor's death are greatly exaggerated, and the possibility of its success is greatly underestimated.
流星死亡的報道被大大夸大了,其成功的可能性被大大低估了。
空前的簡單性:流星的主要特征 (Unprecedented Simplicity: The Key Features of Meteor)
Now that we have clarified the status of Meteor, it is time to describe some of its killer features. Meteor is undoubtedly among the most feature-rich and, at the same time, easy-to-use JavaScript frameworks today.
既然我們已經弄清了流星的狀態,是時候描述它的殺手級功能了。 流星無疑是當今功能最豐富,同時又易于使用JavaScript框架之一。
殺手級功能1:統一客戶端和服務器開發 (Killer Feature 1: Unified Client and Server Development)
Meteor, as we have mentioned before, is notable for its ability to bridge the gap between the server and client sides of any project. Thus, every aspect of your website can be developed solely via JavaScript.
正如我們前面提到的,Meteor以其彌合任何項目的服務器端與客戶端之間的鴻溝而著稱。 因此,您網站的各個方面都可以僅通過JavaScript進行開發。
The benefits of this feature are boundless in the modern development world, and are valuable for both fledgling and the experienced developers.
此功能的好處在現代開發世界中是無窮的,對于新手和經驗豐富的開發人員都是寶貴的。
Above all, this approach allows developers to create projects without experience with other programming languages.
最重要的是,這種方法使開發人員無需使用其他編程語言即可創建項目。
Thus, a talented but inexperienced JavaScript programmer can easily maintain several Meteor projects without any problems. Experienced developers can go even further, maintaining whole ecosystems of services and products via the Meteor platform.
因此,一個有才華但沒有經驗JavaScript程序員可以輕松地維護多個Meteor項目,而不會出現任何問題。 經驗豐富的開發人員可以走得更遠,通過Meteor平臺維護服務和產品的整個生態系統。
Consequently, the adoption of Meteor in your company can be an extraordinary boon for all involved parties.
因此,對于所有相關方而言,在您的公司中采用Meteor可能是一個非凡的福音。
- Your programmers will be able to develop more and spend less time on the exhausting process of learning additional frameworks and programming languages. 您的程序員將能夠在學習其他框架和編程語言這一精疲力竭的過程中進行更多的開發,而花費的時間更少。
- Your customers will enjoy lower pricing on services. 您的客戶將享受較低的服務價格。
- And you will reap higher profits after the adoption of the framework. 采用該框架后,您將獲得更高的利潤。
Independent developers can also be the major benefactors of the development platform today. After all, the ability to use only one language for personal programs will give you an opportunity to take on more freelance projects.
獨立開發人員也可以成為當今開發平臺的主要受益者。 畢竟,僅將一種語言用于個人程序的能力將使您有機會進行更多的自由職業項目。
殺手級功能2:將Web應用程序轉換為智能手機程序 (Killer Feature 2: Transforming Web Applications into Smartphone Programs)
Every company that develops a specific web application seeks to have a smartphone version of its product. The benefits of such a strategy are rather obvious: after all, everyone has an Android or iOS phone today.
每個開發特定Web應用程序的公司都希望擁有其產品的智能手機版本。 這種策略的好處是顯而易見的:畢竟,今天每個人都擁有Android或iOS手機。
However, the businesses that seek smartphone versions of their apps often face the problem of massive development costs. The mobile versions of their web apps are often recreated from scratch.
但是,尋求智能手機版應用程序的企業通常會面臨大量開發成本的問題。 他們的Web應用程序的移動版本通常是從頭開始重新創建的。
If they are lucky, this process might only involve the client-side platforms. However, smartphone development frameworks are so divergent that sometimes both the client and the server have to be extended.
如果幸運的話,此過程可能僅涉及客戶端平臺。 但是,智能手機開發框架差異很大,有時客戶端和服務器都必須擴展。
We are quite sure that you have seen frustrating situations in which certain web apps only have iOS or Android clients for smartphones. The lack of unity regarding frameworks is the main culprit in this case.
我們非常確定,您會遇到令人沮喪的情況,其中某些Web應用程序僅具有用于智能手機的iOS或Android客戶端。 在這種情況下,罪魁禍首是缺乏有關框架的統一性。
Meteor offers an elegant and extensible solution to this problem. Due to the potent integration of Meteor with Apache Cordova, you can quickly turn your web application into a smartphone app without any significant investment.
流星為這個問題提供了一種優雅且可擴展的解決方案。 由于Meteor與Apache Cordova的有效集成,因此您可以快速將Web應用程序轉變為智能手機應用程序,而無需進行大量投資。
On the purely technical side, such a transition is possible due to the embedded container capabilities of Meteor and Cordova. All you would have to do is insert your web app into a pre-developed smartphone container.
在純技術方面,由于Meteor和Cordova的嵌入式容器功能,這種過渡是可能的。 您所要做的就是將您的Web應用程序插入預先開發的智能手機容器中。
Another critical design choice is the approach Meteor takes with data. Meteor uses data on the wire – the server doesn't send HTML but data, which is then rendered by the client. If the design of your web app is already touchscreen-friendly, you can immediately push your new program into the App Store or Google Play Market with Meteor.
另一個關鍵的設計選擇是Meteor處理數據的方法。 流星使用網絡上的數據-服務器不發送HTML,而是發送數據,然后由客戶端呈現。 如果您的Web應用程序的設計已經適合觸摸屏,則可以立即將新程序推入帶有Meteor的App Store或Google Play電子市場中。
If that is not the case, all you would have to do is slightly adjust the design using the JavaScript language. Essentially, the process would be similar to developing a mobile version of a website.
如果不是這種情況,您要做的就是使用JavaScript語言稍微調整設計。 本質上,該過程將類似于開發網站的移動版本。
Once again, such an approach will save you unprecedented amounts of time and money. Instead of having to hire some dedicated smartphone developers, you will be able to fully concentrate on your web apps. This feature is also vital from a purely aesthetic standpoint. Meteor is one of the best tools when it comes to making the design of your products uniform.
再一次,這種方法將為您節省空前的時間和金錢。 不必雇用一些專門的智能手機開發人員,您將可以完全專注于Web應用程序。 從純粹的美學觀點來看,此功能也至關重要。 當使產品設計統一時,Meteor是最好的工具之一。
The use of a unified platform will help you establish a professional standardized look in all business spheres.
使用統一平臺將幫助您在所有業務領域中建立專業的標準化外觀。
殺手級功能3:實時更新 (Killer Feature 3: Real-Time Updates)
Meteor is also capable of real-time updates, or so-called "full-stack reactivity." The changes you make immediately appear across all databases and style templates. In this way, you would be immediately able to see critical bugs and double check the features without having to tediously update web pages and certain programs.
流星還能夠進行實時更新,或所謂的“全棧React性”。 您所做的更改將立即顯示在所有數據庫和樣式模板中。 這樣,您將能夠立即看到嚴重的錯誤并仔細檢查功能,而不必繁瑣地更新網頁和某些程序。
This feature is of vital importance when it comes to large teams. The immediate updates are visible to all team members, creating a perfect environment for collaborative development. Ultimately, your web apps and smartphone programs will significantly benefit from this feature as it makes bug fixing incredibly simple.
對于大型團隊,此功能至關重要。 所有團隊成員都可以看到即時更新,從而為協作開發創造了完美的環境。 最終,您的Web應用程序和智能手機程序將從此功能中受益匪淺,因為它使錯誤修復變得異常簡單。
Without going into details, one way of implementing the feature is a publication/subscription functionality.
無需贅述,實現此功能的一種方法是發布/訂閱功能。
// Code on the server side
const MyAwesomeData = new Mongo.Collection('myAwesomeData');
Meteor.publish('myAwesomeData', () => {
return MyAwesomeData.find()
})
It creates a publication for everything in the collection myAwesomeData
. This publish function is requested whenever a client subscribes to it. So, let's create a subscription.
它為myAwesomeData
集合中的所有內容創建一個發布。 每當客戶端訂閱該發布功能時,都將請求該發布功能。 因此,讓我們創建一個訂閱。
// Code on the client side
Meteor.subscribe('myAwesomeData')
Now, all the subscribers will receive updates whenever a publication is requested. Also, we can receive data using a specific parameter.
現在,每當請求發布時,所有訂閱者都將收到更新。 另外,我們可以使用特定參數接收數據。
// Code on the server side
Meteor.publish('myAwesomeData', (userName) => {
return Comments.find({ userName: userName })
})
The last piece of code retrieves data using a specific user name:
最后一段代碼使用特定的用戶名檢索數據:
// Code on the client side
const userName = 'Jack Sparrow'
Meteor.subscribe('myAwesomeData', userName)
殺手級功能4:輕松進行包裹管理 (Killer Feature 4: Easy Package Management)
Often, the deployment of modified versions of development frameworks requires a significant expenditure of time and resources. Meteor, however, is extremely user-friendly in this regard, offering some of the best package management tools on the market.
通常,部署修改后的開發框架版本需要大量時間和資源。 但是,Meteor在這方面極為用戶友好,它提供了市場上一些最佳的軟件包管理工具。
Today, the community of the Meteor developers maintains a gargantuan database of extensions on the AtmosphereJs website. Some of the popular extensions include tools for embedding ReactJS and Vulcan Bootstrap.
今天,Meteor開發人員社區在AtmosphereJs網站上維護著龐大的擴展數據庫。 一些流行的擴展包括用于嵌入ReactJS和Vulcan Bootstrap的工具。
To install an Atmosphere package, you simply run the following command meteor add nameOfThePackage
:
要安裝Atmosphere軟件包,您只需運行以下命令meteor add nameOfThePackage
:
meteor add react-meteor-data
And to delete a package:
并刪除一個包:
meteor remove react-meteor-data
To import and start using it in code, you should use the "meteor/" prefix:
要導入并開始在代碼中使用它,您應該使用“ meteor /”前綴:
import { useTracker } from 'meteor/react-meteor-data';
More information can be found here: https://guide.meteor.com/using-atmosphere-packages.html#peer-npm-dependencies
可在此處找到更多信息: https : //guide.meteor.com/using-atmosphere-packages.html#peer-npm-dependencies
This feature is especially impressive considering its simplicity. The installation process only requires a set of simple commands that almost any advanced Windows or Linux user should already be comfortable with.
考慮到其簡單性,此功能特別令人印象深刻。 安裝過程只需要一組簡單的命令,幾乎所有高級Windows或Linux用戶都應該已經熟悉這些命令。
Even if you are an absolute beginner, you should have absolutely no problems with setting up a basis for even the most complex programs.
即使您是絕對的初學者,即使為最復雜的程序建立基礎,也應該絕對沒有問題。
Thus, any person can swiftly create app prototypes and make them feature-rich by using this robust library of extensions and the advanced package management tools provided by some of the Meteor developers and the active community that surrounds the framework.
因此,任何人都可以使用此強大的擴展庫和由Meteor開發人員和框架周圍的活躍社區提供的高級軟件包管理工具,快速創建應用程序原型并使它們功能豐富。
殺手級功能5:廣泛的學習資源和文檔 (Killer Feature 5: Extensive Learning Resources and Documentation)
One of the key problems of many open-source projects is the complete lack of proper documentation. This problem led to the death of countless promising projects as outside developers were often forced to essentially reverse-engineer their features.
許多開源項目的關鍵問題之一是完全缺乏適當的文檔。 這個問題導致無數有希望的項目死亡,因為外部開發人員經常被迫對他們的功能進行實質上的反向工程。
Do not worry – Meteor is unlikely to fall victim to this problem. After all, the website of the platform has a powerful set of tutorials for beginners and a whole subsection is dedicated to documentation.
不用擔心-流星不太可能成為這個問題的受害者。 畢竟,該平臺的網站為初學者提供了一套功能強大的教程,并且整個小節都專門介紹了文檔。
We recommend these resources to both the beginners and the advanced users.
我們向初學者和高級用戶推薦這些資源。
If you are new to web development, Meteor tutorials will help you create your first web apps (one of the highlights includes a Whatsapp clone).
如果您不熟悉Web開發,那么Meteor教程將幫助您創建第一個Web應用程序(其中一個亮點是Whatsapp克隆)。
If you are an advanced developer, the tutorials will quickly teach you the basics of Meteor. After that, you will just need to check the documentation from time to time to resolve some issues.
如果您是高級開發人員,那么這些教程將快速教您Meteor的基礎知識。 之后,您只需要不時查看文檔即可解決某些問題。
殺手級特征6:活躍社區 (Killer Feature 6: Active Community ? ? ? ? ? )
If you fail to find information on the Meteor website, you can always resort to the robust forums.
如果您無法在Meteor網站上找到信息,則可以隨時使用功能強大的論壇。
We have spoken extensively about the death of Meteor in the first section of this article. Few facts defy this claim as much as the community of Meteor users.
在本文的第一部分中,我們廣泛討論了流星的死亡。 很少有事實能像流星用戶社區那樣反駁這一說法。
As the massive extension library of Meteor proves, the framework receives active support not only from its developers but also from the community.
正如Meteor龐大的擴展庫所證明的那樣,該框架不僅得到了開發人員的積極支持,還得到了社區的積極支持。
At the time of Meteor's presumed death, the interest from developers regarding the platform was seeing unprecedented growth. Consequently, the framework now has an incredibly passionate user base which is always ready to troubleshoot your problems.
在Meteor可能去世的時候,開發人員對平臺的興趣正在空前增長。 因此,該框架現在擁有令人難以置信的熱情用戶群,隨時準備解決您的問題。
Many people (including myself) know that Meteor’s community is among the nicest on the Internet. You are unlikely to meet any hostility there, and many active members are eager to help newcomers.
許多人(包括我自己)都知道流星的社區是Internet上最好的社區之一。 您不太可能在那里遇到任何敵意,許多活躍成員渴望幫助新來者。
Since Meteor developers have received a significant financial boost from the Tiny Investment Fund, this community is likely to grow even more. Thus, your adoption of Meteor is likely to be very smooth as countless developers will be be ready to assist you.
由于Meteor開發人員已從Tiny Investment Fund獲得了可觀的財務支持,因此該社區的增長可能會更大。 因此,您的采用Meteor可能會非常順利,因為無數開發人員已準備好為您提供幫助。
結論:那么,你應該學習流星嗎? (Conclusion: So, Should You Learn Meteor?)
The short answer is simple: yes, undoubtedly.
簡短的答案很簡單:是的,毫無疑問。
Knowledge of the Meteor platform is the perfect addition to any developer's portfolio.
流星平臺的知識是任何開發人員產品組合的完美補充。
- If you primarily develop with JavaScript, the platform will help you or your company cut time expenditures on creating separate client and server projects. 如果您主要使用JavaScript進行開發,那么該平臺將幫助您或您的公司減少在創建單獨的客戶端和服務器項目上的時間支出。
- If you are an independent developer who uses C# or Ruby, Meteor can be a perfect entry point into JavaScript development. It will allow you to create independent web app projects with one programming language. 如果您是使用C#或Ruby的獨立開發人員,那么Meteor可能是JavaScript開發的理想入口。 它將允許您使用一種編程語言來創建獨立的Web應用程序項目。
- If you are an absolute beginner, the platform will help you create your first well-functioning apps after just a few weeks. 如果您絕對是初學者,那么該平臺將在幾周后幫助您創建第一個運行良好的應用程序。
- If you want to establish a startup, Meteor can be a perfect starting point for quickly creating a powerful prototype of your future web app. More importantly, the tool is robust enough to make any transition to other platforms unnecessary after prototyping. 如果您想建立一家初創公司,Meteor可以作為快速創建未來Web應用程序的強大原型的理想起點。 更重要的是,該工具具有足夠的魯棒性,無需在原型制作后即可過渡到其他平臺。
Essentially, with Meteor, only the sky is the limit. Modern development is becoming more and more web-centric. Meteor perfectly reflects this trend, offering an all-encompassing platform for web developers.
本質上,對于Meteor,只有天空才是極限。 現代發展正變得越來越以網絡為中心。 流星完美地反映了這一趨勢,為Web開發人員提供了一個全方位的平臺。
By using it, you will be able to create a seamless integration of web and mobile apps, both of which are the future of consumer-centric computing.
通過使用它,您將能夠創建Web和移動應用程序的無縫集成,這兩者都是以消費者為中心的計算的未來。
您對JavaScript項目有想法嗎? (Do you have an idea for a JavaScript project?)
My company KeenEthics is an early adopter of the Meteor framework and a well-established JavaScript company in general. In case you have a promising project in mind, feel free to request an estimate.
我的公司KeenEthics是Meteor框架的早期采用者,并且是一家公認的知名JavaScript公司。 如果您有一個有前途的項目,請隨時提出估計 。
If you have enjoyed the article, you should continue with What Are the Advantages of Node.JS? and Angular vs React: What to Choose for Your App?
如果您喜歡這篇文章,則應繼續閱讀Node.JS的優點是什么? 和Angular vs React:為您的應用選擇什么?
翻譯自: https://www.freecodecamp.org/news/should-i-work-with-meteor-in-2020/
代碼流星雨是什么形式