一切都是關于“ –ilities”的

by George Stepanek

通過喬治·斯蒂芬內克

都是關于“邪惡”的 (It’s all about the “-ilities”)

We were “feature complete.”

我們“功能齊全”。

Four weeks into a 10-week Free Code Camp project to build an environmental pledge web application, we had gotten all of the use cases working correctly.

在為期10周的免費代碼訓練營項目中建立環境承諾Web應用程序的四個星期中,我們已經使所有用例都能正常工作。

Which meant that we were finished, right?

那意味著我們完成了,對吧?

Not even close!

差遠了!

It took another four weeks just to bring the app up to a professional level of quality. It wasn’t just about finding and fixing a few remaining bugs. Most of the work we still had to do was about sorting out the “–ilities”: non-functional requirements, such as usability and compatibility.

又花了四個星期才使應用程序達到專業水平。 這不僅僅是尋找和修復一些剩余的錯誤。 我們仍然要做的大多數工作是解決“ -ilities”: 非功能性需求 ,例如可用性和兼容性。

The app was working OK. But now we needed to make it work better.

該應用程序運行正常。 但是現在我們需要使它更好地工作。

“Two seconds is the threshold for ecommerce website acceptability. At Google, we aim for under a half second.” — Maile Ohye
“兩秒鐘是電子商務網站可接受性的門檻。 在Google,我們的目標是不到半秒鐘。” - Maile Ohye

性能 (Performance)

The application needed a multi-page look and feel, so people could share the URLs of individual pledges or of their own pledge achievements, but we couldn’t achieve the sub-second response times we wanted using a multi-page design. It was simply taking too long to download and render the pages.

該應用程序需要多頁面的外觀,因此人們可以共享各個承諾的URL或自己的承諾成就的URL,但是我們無法使用多頁面設計達到我們想要的亞秒級響應時間。 下載和呈現頁面只花了很長時間。

Our solution was to refactor it into a React-based single-page application that catches the click events of the hyperlinks to control which ‘page’ to display:

我們的解決方案是將其重構為基于React的單頁面應用程序,該應用程序可捕獲超鏈接的click事件以控制顯示哪個“頁面”:

var self = this;$('a').click(function (event) {    var href = $(this).attr("href");    self.setState({ url: href });    window.history.pushState('', '', href);    event.preventDefault();});

This means that the application gets fully loaded only once (which may take a few seconds over a slow connection) and then each click within the site is much, much faster.

這意味著應用程序只需要完全加載一次 (在緩慢的連接上可能要花費幾秒鐘的時間),然后每次點擊網站的速度都快得多。

We also aggressively optimized the images with Adobe Photoshop to reduce download times, and made sure that the pages are readable even while their images are still being downloaded.

我們還使用Adobe Photoshop積極優化了圖像,以減少下載時間,并確保即使在其圖像仍在下載時頁面也可讀。

兼容性 (Compatibility)

When you put a web application up on the public internet, you don’t know who is going to access it, which browser they’re going to use, or how old their browser version will be. It has to work for everyone.

當您將Web應用程序放置在公共Internet上時,您不知道將要訪問誰,將使用哪些瀏覽器或瀏覽器的版本多大。 它必須為每個人工作。

One advantage of our single-page app design was that it was easy to get it to turn itself off for older browser versions that don’t support the APIs we needed, and fall back to using the hyperlinks as-is. Using the application this way is slower, of course, but it still works just fine.

我們的單頁應用程序設計的一個優勢是,對于不支持我們所需API的較舊版本的瀏覽器,很容易將其關閉,而可以直接使用超鏈接。 當然,以這種方式使用應用程序的速度較慢,但??仍然可以正常工作。

These days most modern browsers are reasonably compatible with each other, but you should still test as widely as possible. We found that we needed to put in special rules for older versions of Internet Explorer (which wasn’t unexpected) and iOS (which was).

如今,大多數現代瀏覽器可以合理地相互兼容,但您仍應進行盡可能廣泛的測試。 我們發現,我們需要為Internet Explorer的較早版本(這不是意外的)和iOS(過去的版本)設置特殊的規則。

“Don’t make me think” —Steve Krug
“不要讓我思考”-Steve Krug

易用性 (Usability)

We thought that our application — with five categories that each contained a dozen or so pledges — was pretty simple.

我們認為我們的應用程序非常簡單,它分為五個類別,每個類別包含十幾個承諾。

But when we asked our friends and family to do user testing, some of them said they got confused as to where they were in the application, and didn’t really understand how to get to where they wanted to go.

但是,當我們要求我們的朋友和家人進行用戶測試時,其中一些人說他們對應用程序中的位置感到困惑,并且并不真正了解如何到達他們想要去的地方。

It needed to be more intuitive.

它需要更加直觀。

So we added icon breadcrumbs to the header to help people get an immediate sense of where they are in the hierarchy of pages, with hyperlinks to help them go back up.

因此,我們在標題中添加了圖標面包屑 ,以幫助人們立即了解他們在頁面層次結構中的位置,并通過超鏈接來幫助他們向上備份。

We also added next pledge and previous pledge arrows so people could easily click through from one pledge to the next without having to go back to the category page each time.

我們還添加了下一個質押上一個質押箭頭,因此人們可以輕松地從一個質押單擊到下一個質押,而不必每次都返回類別頁面。

設計 (Design)

The 1to1 Movement describes itself as a “branding organization” whose aim is to make environmentalism more appealing. Their main website has a modern and stylish design, and we wanted to carry that forward into our web application.

一對一運動將自己描述為一個“品牌組織”,其目的是使環保主義更具吸引力。 他們的主要網站采用現代時尚的設計,我們希望將其延續到我們的Web應用程序中。

So we copied some of the main design aspects — full bleed images, low contrast thumbnails, specific fonts, turquoise highlight color — and then we asked a knowledgeable friend to give us design review to make sure we were using them correctly and consistently.

因此,我們復制了一些主要的設計方面-全出血圖像,低對比度縮略圖,特定字體,綠松石突出顯示顏色-然后,我們請一位知識淵博的朋友給我們進行設計審查,以確保我們正確且一致地使用它們。

We wanted everyone to come away with a good impression, and part of that was checking that the website looks good on all screen sizes, all the way from mobile phones right up to high-resolution displays. Using a responsive UI framework like Bootstrap got us most of the way there, but we still needed check for glitches at various viewport widths. For example, we had to add { white-space: nowrap; } to the breadcrumbs section to prevent it from breaking up when the header line gets wrapped.

我們希望每個人都能留下良好的印象,其中一部分是檢查網站在所有屏幕尺寸上(從手機到高分辨率顯示器)的外觀是否良好。 使用類似Bootstrap的響應式UI框架可以幫助我們解決大部分問題,但是我們仍然需要檢查各種視口寬度下的毛刺。 例如,我們必須添加{white-space:nowrap; }到面包屑部分,以防止在標題行被換行時它破裂。

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” —Martin Fowler
任何傻瓜都可以編寫計算機可以理解的代碼。 好的程序員編寫人類可以理解的代碼。” -馬丁·福勒

可維護性 (Maintainability)

Many of these fixes and improvements were for unusual browsers or versions, or for rarely encountered use cases. So one key thing we did was add meaningful comments to explain why each component was coded the way it was. We wanted future developers understand how everything worked, and make it easier for them to avoid breaking existing functionality when they add new features.

這些修復和改進中有許多是針對不尋常的瀏覽器或版本,或者是很少遇到的用例。 因此,我們要做的一件事是添加有意義的注釋,以解釋為什么每個組件都按原樣編碼。 我們希望未來的開發人員了解一切工作原理,并使其在添加新功能時更容易避免破壞現有功能。

A good set of unit tests would also help future developers, because they make it quick and easy to check for broken code. We used mocha and supertest to create automated tests for the back-end business logic in our API calls.

一套好的單元測試也將對將來的開發人員有所幫助,因為它們使檢查損壞的代碼變得容易快捷。 我們使用mocha和supertest在API調用中為后端業務邏輯創建自動化測試。

下一步是什么? (What’s Next?)

With all of this done, could we now walk away in good conscience? Not quite!

完成所有這些工作后,我們現在可以憑良心走開嗎? 不完全的!

Even though we’d made the application production-ready, we still needed to actually deploy it into production and properly hand it over to the client.

即使我們已經準備好將應用程序投入生產,我們仍然需要將其實際部署到生產環境中并正確地移交給客戶。

But that’s a tale for another time…

但這是另一回事了……

Thanks for reading. I hope this article has helped you better understand all the “–ilities” involved in making an app production-ready.

謝謝閱讀。 我希望本文能幫助您更好地理解使應用程序投入生產所需的所有“麻煩”。

翻譯自: https://www.freecodecamp.org/news/its-all-about-the-ilities-875682184dc8/

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/396022.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/396022.shtml
英文地址,請注明出處:http://en.pswp.cn/news/396022.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

1,滑動驗證,前后臺接口

http://www.geetest.com/install/sections/idx-client-sdk.html 轉載于:https://www.cnblogs.com/yexiangwang/p/5481153.html

Linux 下 nginx反向代理與負載均衡

前面幾篇記錄下nginx的基本運功,代理服務器的訪問,這里來試驗下nginx的反向代理。 反向代理(Reverse Proxy)方式是指以代理服務器來接受internet上的連接請求,然后將請求轉發給內部網絡上的服務器,并將從服…

android 8.1沒聲音,Android 8.1重大改變!耳機孔不見了

原標題:Android 8.1重大改變!耳機孔不見了今天上午,Android Police爆料稱,下一代的Pixel 2將首發Android 8.1。更重要的是,在這個新系統中,谷歌已經做好了放棄3.5mm耳機插口的準備,并將在底層優…

php變量前下滑_PHP變量

變量來源于數學,是計算機語言中能儲存計算結果或能表示值抽象概念。變量可以通過變量名訪問。變量是存儲數據的“容器”。命名規則變量以 $ 符號開始,后面跟著變量的名稱變量名必須以字母或者下劃線字符開始變量名只能包含字母數字字符以及下劃線(A-Z、a…

《計算機科學概論(第12版)》—第0章0.3節學習大綱

本節書摘來自異步社區《計算機科學概論(第12版)》一書中的第0章0.3節學習大綱,作者【美】J. 格倫?布魯克希爾(J. Glenn Brookshear) , 丹尼斯?布里羅(Dennis Brylow),更多章節內容可以訪問云棲…

blued停止郵箱注冊_停止讓我注冊!

blued停止郵箱注冊by Conor Sheehan由Conor Sheehan 停止讓我注冊! (Stop Making Me Sign Up!) Installing a new app can be exciting. When you’ve found one that may be just what you need, opening it is like unboxing a new toy. So why do so many apps …

Android Sutido 編譯速度優化

雖然Android Studio 此時已經更新到了Android Studio 2.1版本,build 版本android-studio-bundle-143.2739321。但是在安裝該版本都是根據自己的標準進行安裝,所以需要在安裝之后進行一系列的調整。下面文章根據3個方面進行講解。分別為Android Studio本身…

卷積神經網絡計算題試題_卷積神經網絡的計算

轉自:https://zhuanlan.zhihu.com/p/631747741. 卷積卷積神經網絡中的卷積是指定義好卷積核(kernel),并對圖像(或者特征圖,feature map)進行滑動匹配,即對應位置相乘再相加。其特點就在于能夠捕捉局部的空間特征。具體過程如下圖所…

html字符串轉換jsx,javascript – 將React.element轉換為JSX字符串

我正在嘗試構建一個組件,>帶孩子和>渲染DOM中的子項,以及>出于文檔的目的,在pre中顯示子DOM一種解決方案是將JSX作為單獨的prop傳遞.這使得它重復,因為我已經能夠通過this.props.children訪問它.理想情況下,我只需要以某種方式將子prop轉換為字符串,以便我可以在pre中…

Leetcode:0002(兩數之和)

LeetCode:0002(兩數之和) 題目描述:給定兩個非空鏈表來表示兩個非負整數。位數按照逆序方式存儲,它們的每個節點只存儲單個數字。將兩數相加返回一個新的鏈表。你可以假設除了數字 0 之外,這兩個數字都不會…

《Excel 職場手冊:260招菜鳥變達人》一第 13 招 利用數據驗證給單元格添加注釋,不用批注...

本節書摘來異步社區《Excel 職場手冊:260招菜鳥變達人》一書中的第1章,第13節,作者: 聶春霞 , 佛山小老鼠 責編: 王峰松,更多章節內容可以訪問云棲社區“異步社區”公眾號查看。 第 13 招 利用數據驗證給單…

招銀網絡筆試java_春招|招銀網絡Java軟件開發 電話面試+一二三面面經

電話面試:1.自我介紹2.介紹項目經歷(我介紹的時候說了用到spring,spring MVC和hibernate框架)3.為什么用spring框架,有什么優點4.詳細說下aop5.解釋下IOC,IOC有什么好處6.spring MVC的運行流程7.spring除了注解注入還有什么方式8.hibernate框…

Numpy and Pandas

安裝 視頻鏈接:https://morvanzhou.github.io/tutorials/data-manipulation/np-pd/ pip install numpy pip install pandas Numpy 學習 Numpy屬性 import numpy as nparray np.array([[1,2,3],[2,3,4]]) print(array) print(number of dim:,array.ndim)//幾維度 pr…

認證android retrofit,Retrofit之項目介紹

項目介紹官網對retrofit介紹是這是一個"類型安全(type-safe)"的Android/Java http客戶端. 目前retrofit的最新正式版本為1.9.0. 2.0版本預計2015年底發布, 相較于之前版本, 2.0版本在架構上做了很大改變, 本文代碼相關的內容都是基于retrofit2.0-beta2.注: 在編程語言…

層次聚類算法 算法_聚類算法簡介

層次聚類算法 算法Take a look at the image below. It’s a collection of bugs and creepy-crawlies of different shapes and sizes. Take a moment to categorize them by similarity into a number of groups.看看下面的圖片。 它是各種形狀和大小的錯誤和令人毛骨悚然的爬…

.h .dll .lib

.h為對一個函數的聲明引用,include就是聲明某個文件里的函數(內只有聲明函數被引用了),編譯時使用 .lib為鏈接時用的,存放的是對于DLL里函數的位置信息等,這樣不必把所有dll里函數都加載到內存里&#xff0…

《機器人學經典教程》——2.2 控制論

本節書摘來異步社區《機器人學經典教程》一書中的第2章,第2.2節,作者:【美】Maja J. Matari?(馬婭?馬塔里奇),更多章節內容可以訪問云棲社區“異步社區”公眾號查看。 2.2 控制論 隨著控制理論的不斷發展…

嗶哩嗶哩網站前端源碼_分享一個仿制嗶哩嗶哩鏡子網站源碼

我老婆非常喜歡看嗶哩嗶哩,前些天她興奮地和我說嗶哩嗶哩網站有個隱藏的彩蛋,傳送門http://www.ilidilid.com/,我看了下,相當于把鏡子中的網站樣子弄出來了。于是,我尋思著,把自己的博客也弄個這樣的彩蛋&a…

promise-async-await

通常而言,這3個關鍵字 都是用來「優雅」的處理ajax異步請求的 //es6的時候promise誕生,很好的解決了嵌套回調地獄,改良方案為鏈式回調。// es2017的時候誕生了async、await,這下異步直接沒有回調了,像同步一樣爽//沒有…

第一沖刺階段博客檢查

我們檢查的團隊是:紅鳥 ①團隊博客: 該團隊將所有的站立會議均寫到了4月28日的一篇博客中,并且其中任務看板和燃盡圖不全。 ②團隊成員個人博客: 1>張曉晨: 沒有每天個人工作總結。 2>王曉思: 從4.19…