驚豔的基於nodejs的即時Web開發架構Meteor介紹,nodejsmeteor

來源:互聯網
上載者:User

驚豔的基於nodejs的即時Web開發架構Meteor介紹,nodejsmeteor

      昨天偶然發現了Meteor這個web開發架構,我接觸過的各種語言的Web開發架構大概有十幾個了,這個Meteor架構讓我感到震驚,和其他的架構太不一樣了(包括一些同樣基於nodejs的架構如express等的,基於Python的新架構Flask,Tornado等)。

      Meteor是一個基於nodejs和mongodb資料庫的即時web架構,前後端代碼都是基於js開發,並且可以混合在一起,在開發時如果js,css,html等檔案改了,頁面會自動更新,同樣如果mongodb資料庫裡面的資料修改了,頁面也會自動更新,開發時根本不需要重新整理了頁面了,是不是很震驚!

       和其它新型架構一樣,它也提供了meteor命令列工具,可以用來產生模版項目,並整合了nodejs和mongodb,上手很容易。另外還整合了cordova架構,用來封裝App,支援Android和iOS平台。

      個人感覺這個架構適合拿來快速開發一些新型的即時網站,至於用來開發傳統的Web應用,目前由於沒有這方面的實際經驗,還不確定是否適合。但Meteor在github上已經有22000多個star了,應該還是比較熱門的。

     下面是官方的介紹https://www.meteor.com/


Meteor is an ultra-simple environment for building modern websites. What once took weeks, even with the best tools, now takes hours with Meteor.

The web was originally designed to work in the same way that mainframes worked in the 70s. The application server rendered a screen and sent it over the network to a dumb terminal. Whenever the user did anything, that server rerendered a whole new screen. This model served the Web well for over a decade. It gave rise to LAMP, Rails, Django, PHP.

But the best teams, with the biggest budgets and the longest schedules, now build applications in JavaScript that run on the client. These apps have stellar interfaces. They don't reload pages. They are reactive: changes from any client immediately appear on everyone's screen.

They've built them the hard way. Meteor makes it an order of magnitude simpler, and a lot more fun. You can build a complete application in a weekend, or a sufficiently caffeinated hackathon. No longer do you need to provision server resources, or deploy API endpoints in the cloud, or manage a database, or wrangle an ORM layer, or swap back and forth between JavaScript and Ruby, or broadcast data invalidations to clients.

Quick start!

The following works on all supported platforms.

Install Meteor:

$ curl https://install.meteor.com | /bin/sh

Create a project:

$ meteor create myapp

Run it locally:

$ cd myapp$ meteor# Meteor server running on: http://localhost:3000/

Unleash it on the world (on a free server we provide):

$ meteor deploy myapp.meteor.com
Principles of Meteor
  • Data on the Wire. Meteor doesn't send HTML over the network. The server sends data and lets the client render it.

  • One Language. Meteor lets you write both the client and the server parts of your application in JavaScript.

  • Database Everywhere. You can use the same methods to access your database from the client or the server.

  • Latency Compensation. On the client, Meteor prefetches data and simulates models to make it look like server method calls return instantly.

  • Full Stack Reactivity. In Meteor, realtime is the default. All layers, from database to template, update themselves automatically when necessary.

  • Embrace the Ecosystem. Meteor is open source and integrates with existing open source tools and frameworks.

  • Simplicity Equals Productivity. The best way to make something seem simple is to have it actually be simple. Meteor's main functionality has clean, classically beautiful APIs.

Learning Resources

There are many community resources for getting help with your app. If Meteor catches your interest, we hope you'll get involved with the project!

TUTORIAL
Get started fast with the official Meteor tutorial!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.