跳到主要內容

[教學] Mojito 安裝與入門,install mojito for beginner.

mojito,最近終於從 YDN 對外公開此專案,這個套件主要用於解決前端多重裝置及瀏覽器端的問題,後端服務採取 node.js ,因此使用上必定要先準備以下幾個元素

準備素材

  • c++ complier
  • git
  • Node.js > 0.4.x
  • NPM > 1.0.x

安裝方式

git clone git://github.com/yahoo/mojito.git
cd mojito/source
sudo npm install -g .
npm install .
以上四個簡單的步驟,就可以把 mojito module 完整安裝到服務器上,接著就可以開始進入 mojito 的世界

使用方式

mojito 提供了完整的 command line 給開發者使用,接著先建立一個基本 hello world 專案,跟著以下步驟完成第一個專案。首先建立一個 mojito application,
mojito create app hello
cd hello
切換到目錄之後,再接著建立自己的 mojit,這邊的 mojit 就像是一個應用(application)可能會包含許多個獨立網站體,擁有獨立架構的 MVC ,包含內部設定等,詳細資料可以參考官方的說明,建立 mojit
mojito create mojit HelloMojit
輸入指令後,會看到顯示結果如下,
creating mojit called 'HelloMojit'
(using "default" archetype)
✔ mojit: HelloMojit created!
✔ mojito done.   
接著修改 application.json 這個 mojit 設定檔案,讓剛才新建立的 hellp application 指定底下有一個 mojit -> HelloMojit ,讓應用可以去執行 mojit controller ,修改如下,
[
  {
    "settings": [ "master" ],
    "appPort": 8666,
    "specs": {
      "hello": {
        "type": "HelloMojit"
      }
    }
  }
]
再修改 route.json ,指定應用的路徑會執行哪一個 controller ,修改如下,
[
  {
    "settings": [ "master" ],
    "hello index": {
      "verbs": ["get"],
      "path": "/",
      "call": "hello.index"
    }
  }
]

啟動 mojito 服務器

最後啟動 mojito 服務器,
mojito start
開啟瀏覽器,檢查是否執行正確
http://localhost:8666/
會顯示結果如下,
status
    Mojito is working.
data
    some: data    
恭喜,完成了第一個 mojito 應用程式。

後記

Yahoo 這次公開的 mojito 專案,是目前看起來架構、文件都是最完整的,同時也有提到可以透過 mojito 建構出多種不同裝置適用的 web app,同時裡面包含了 jslint, js compressor, l10n 等讓開發者可以透過 mojito 滿足許多需求,當然 mojito 也是可以融合 YUI 使用。
Node.JS 發展至今,加上其他開發者的投入,已經讓 JavaScript 這個語言在 web 有了不同的角色,橫跨前後端服務。

工商服務

體會 JavaScript 的優點、美好,歡迎關注 JSDC,台灣 JavaScript 盛會即將展開!


留言

  1. Howdy! Someeone іnn my Myspace group shared this site with us so
    I came to give it a looκ. I'm definitely enjoying the
    information. I'm book-marking aոd will bbe tweeting hіs to my followers!
    Great blog and wonderful stylee and design.

    My blog post; best Baby monitors uk 2012

    回覆刪除
  2. Back to year 2010, we may have experienced some
    of our friends being layoff by the company and jobless to get a period of time.
    However, you must be careful when using such codes.
    After returning recently from Portabelo, Panama where the renowned pirater
    expert and adventurer had the opportunity to dive on
    and study several shipwrecks involved in Sir Francis Drake's burial at sea, (
    Croce will speak about his adventures and the journeys of the pirates of St.

    com friends inbox me that she what food was in typically the U.
    Once you have look at this article you will not have to deal with
    your traffic worries anymore. I believe that it can be done without the
    check, if you keep talking to the two of them.
    Among the most common methods are stealing passwords, email hacking and
    phishing.

    my webpage - pirater facebook gratuitement 2014 - facebook decryptor

    回覆刪除
  3. WOW just what I was searching for. Came here by searching for

    Also visit my webpage: bistro md diet

    回覆刪除
  4. Speaking tom is now available via Intel Appup, which make every thing simple and hassle totally free to get it.
    Here are the steps used to get talking tom to Computer.
    The query is, do carriers lose cash on these offers.

    Feel free to visit my webpage - kik setup for pc (http://testdrivinglife.blogspot.nl/)

    回覆刪除
  5. Very good article! We are linking to this particularly great content
    on our website. Keep up the good writing.

    Look into my blog post :: Meska-apteka.pl

    回覆刪除
  6. I am really grateful to the holder of this weeb site who has shared this enormous piece of writing at at this time.


    Review my blog what is tinnitus a symptom of

    回覆刪除
  7. Why viewers still mae use of to read news papers when inn this technological globe all iis existing on net?


    mypage - marketing

    回覆刪除
  8. I read this article fully concerning the difference of most recent and earlier
    technologies, it's remarkable article.

    my web page plumber snake Avondale

    回覆刪除
  9. Hi there, just became alert to your blog through Google, and found that it is truly
    informative. I am going to watch out for brussels.
    I will be grateful if you continue this in future.

    Many people will be benefited from your writing. Cheers!



    Feel free to visit my blog; http://www.ashrafit.Com

    回覆刪除
  10. Thank you for every other fantastic post. Where else could anybody get that type of info in such
    an ideal means of writing? I have a presentation subsequent week, and
    I'm at the look for such information.

    My homepage; meal plans for weight loss

    回覆刪除
  11. Wonderful beat ! I wish to apprentice at the same time
    as you amend your website, how could i subscribe for a blog web site?
    The account aided me a appropriate deal. I have been a little bit
    familiar of this your broadcast provided vibrant transparent idea

    Here is my web page ... 2015 Yukon

    回覆刪除
  12. inquisitory to fin. This allows you to hurt collection which professionals wishing to hit his arm and a t-raiment about
    your root or unit equity debt. Don't be bullied of sulfite warnings.
    All wines do not roll in the hay when something happens where
    you privation to regard wear, is Coach Outlet Coach Purses Outlet Coach Outlet Online Coach Outlet Coach Handbags Coach Outlet Online Coach Outlet can work you have an current
    bear on, so use them on a regular basis, they retributive demand a one-restraint maker
    for reformatory aggregation. to the highest degree problems with hostility headaches are no unlawful additions to your pieces
    in collaboration, all the sentence. plan classes position to wear
    aget dressed look on, that combines single flavors.

    Take a look at my web-site - Coach Factory Online

    回覆刪除
  13. Justin Bieber Kisses Selena Gomez at 2011 MTV VMAs. Mobile Holidays Examiner is interesting while sharing traditional
    and bizarre holidays, food holidays along with history and trivia about fun holidays throughout the year.
    He is the man behind Girls Gone Wild, and Kim is
    at his home for the second time this summer.


    Here is my web blog :: Kim Kardashian Hollywood
    Hack - kimkardashianhollywoodhack.com -

    回覆刪除

張貼留言

這個網誌中的熱門文章

[分享] 腳踏車環島注意事項

很多人都期望自己能夠做點什麼,做些什麼,而退伍之後的第二個星期,就展開了環島之旅。

對很多人來說這不算什麼,甚至有人展開了走路、跑步、溜滑板、單輪車等方式環島一周,充分展現對台灣的愛與關懷。

這篇主要讓不知道怎麼準備環島的人,作一個完善的解說,首先隨身的東西要有:

證件現金類
身份證健保卡學生證現金提款卡悠遊卡

館長的網站技術瓶頸,小弟弟來解答 - notorious-2019.com

館長的網站技術瓶頸,小弟弟來解答 - notorious-2019.com昨天看到館長的網站倒了,也看到館長說一個月花費大概一百萬左右的月費在支持這個架設的電商網站,也對外發布出來訊息,希望求救,直接講結論建議解法,1. 首先要做的事情是讓整個網站可以橫向擴展 (Load Balancer + n 台伺服器),對,相信我,IIS 也是可以做 Scale out, 這是對於 Application layer 服務的解法。2. 資料的部分 SQL 吞吐量,建議改成 GCP Cloud SQL, 或者就直接轉到 Azure SQL Server 環境上會相對容易解決 SQL 的問題。上述 2 個步驟都處理完,其實 100 萬的費用,應該 20000 concurrent user 是沒有問題的,但前提是要設定『對』!額外需要花較長期時間要處理的,建議就是在 Queue 的處理,購物車的狀態都可以進入到 Queue 再來處理 SQL insert 的問題,減少不斷的 insert / update 的狀態,後文會提到 ...底下詳細的會再說明如何後後續還有哪些處理的細節。這兩天剛好有個小空擋,就來分析一下狀況,可以從外部讀取得到的服務大致上如下,ASP.Net: 4.0IIS 10 + Windows (廢話)SQL Server (推測)OP Service: PleskWinHost: Google CloudDNS: Cloudflare前端服務內容架構Server-side render, jQuery base, 推測有可能採用現成購物車來進行,看起來不太像是用 wooCommerce 比較像是 Cart Functionality 這類的項目直接搭建而成(當然這純屬猜測)功能拆解因為網站是透過 Server site render 所有頁面都需要重新透過伺服器進行載入,這樣的狀況,如果在頻繁忙碌的 eCommerce 網站架構下會是一個致命傷,簡單來說,數量的查詢,特惠價,優惠碼等等資訊的處理,使用者每做一步都需要重新跳轉頁面,或者整頁面重新讀取,只是為了部分的資料更新,這些都可以抽取出來成為 API ,透過 AJAX 的方式進行讀取。讀寫分離在不了解目前資料庫複雜狀態下,首先要讓所有人都可以讀取到資料,頁面可以跑出來,建議至少將讀取資料庫,和寫入資料庫的…

Scrum management tool 敏捷開發工具概觀介紹

Scrum management 工具概觀介紹
會有這個念頭興起主要也是因為這幾個月內,是在公司內部訓練透過 Teddy 老師 Scrum 課程了解整個 Scrum 的流程,開始進行團隊的 Scrum 流程導入。

在過年春節期間去嘗試市面上的 Scrum 管理軟體,也透過眾多大大得到解答

這邊就不詳細討論怎麼進行 Scrum 的軟體開發,而是在於管理機制,就整個流程上,對於自己需要的項目有,
SprintUser Story (Backlog)Task management task time countertask assigneeburndown chart 以上這幾個是在 Scrum 流程裡面最基本的需求以及解法,而根據大量搜尋結果,也找到許多不同平台,以下為個人分析經驗,
trello.comhttps://trello.com/ 一開始很直覺的就會採用到 Trello ,而經過測試後,如果直接的使用 trello 是沒有辦法達到以上的所有方法,必須要結合,scrum for trello ,所以也表示如果你的電腦沒有安裝 Chrome的話,勢必就是 GG
的確這是一個假命題,身為一個開發者,或者前端人員怎麼可能沒有 Chrome ,(也許真的沒有),不過比較麻煩的是,雖然 trello 加上套件後可以管理 Task, time counter, burndown chart 都有支援,但是通常一個 Sprint 會有兩到三個 User Story ,所以對於 task 橫向管理對應 User Story 是比較麻煩的。
taiga.iohttps://taiga.io/ Taiga 也是許多人推薦的一套管理系統,就整體表現以及流程上,的確沒有像是 trello 這麼順暢,不過從另外一個方面來看,他是完全 open source ,而且可以 self host 這點來說,的確是非常適合用於自己的敏捷專案管理上,這點的確可以說是開源軟體的轟炸機。

不過就回到 Scrum 管理層面來說,畢竟人家 taiga 開宗明義就說了,流程上是符合于 kanban ,所以缺少了 task time counter 的部份,也沒有 User story 管理。所以回到 Scrum 本身,Taiga 就並不是這麼適合。
blossom.iohttps://www.blo…