1. 程式人生 > >使用合適的框架後 自己需要做的4件事情

使用合適的框架後 自己需要做的4件事情

  1. We write if-else, switch, while, AND, OR and equalsIgnoreCase more than we know.  Our business logic depends on them.
  2. We also do some reading from / writing to a persistent store in most of our projects. We write to the files. We write to cache, in-memory or session. We write to the database. We write to a stream (byte or character). We write to the indexer (Solr, graph, nodes). And then we read from it all.
  3. We leverage maps and lists for the rest of the code. We store things as key value pair. We iterate over a map or list in most of our projects. We iterate over objects which come from various sources in these lists or map. We iterate over items from the persistent stores I mentioned above.
  4. We figure out a way to send the data that we played with in three steps above all the way up to the browser. This exchange of data is web development. Web Frameworks make this possible.

上面的4句話是赤裸裸的現實。

作為一個開發者,一個專案我覺得應該有以下幾條準則需要確認:

Criteria 1: You need to build something fast.

Criteria 2: You have to learn an existing system and improve upon it.

Criteria 3: You have to integrate with an outside service provider to pull or push data.

Criteria 4: You are able to work with limited control over presentation.

Criteria 5: And you want your system to be mature and perform well.

以下是列舉Spring框架的好處。

Spring Framework

With Spring, I can build something fast. Let me give you an example.

I am learning Cassandra for one of my projects. I spent couple hours learning how to setup Cassandra and understanding CQL.

I am already familiar with Spring Data for MongoDB and Oracle. Bringing Spring Data for Cassandra was as simple as pulling ‘Cassandra’ dependency Jar.

The Spring Initializer generated jar came with a unit test. I added Cassandra properties and an example I copied from the web. Voila! I am in business. Maybe I will do a video showing this next.

With Spring, I can work with an existing system and improve it.

Most of my projects involved taking an existing system and enhancing it with Spring. Spring Framework allowed me to not disrupt any existing behavior but build in parallel. I migrated to Spring in increments.

With Spring, I can integrate my application to expose to or pull from third party services. 

I can give you a number of examples here.

I used to work with Axis2 and brought Spring to expose my service as SOAP.

I had an existing Spring MVC application and leveraged same service to expose as a REST resource.

Spring allows me to switch between JAX-RS Implementations.

Spring allows me to switch between databases with minimal code changes.

With Spring, I can work with any front-end technology.

I have worked with Struts, jQuery, AngularJS, Tapestry and JSF with Spring as a backbone. I worked with HandlebarsThymeleaf, JSP, JSTLTilesFree MarkerSiteMesh and Velocity templates. Speaking of AngularJS + Spring, check out jHipster.

With Spring, I get a mature framework.

This beats almost all the other criteria above. And I can say this separates Spring Framework from the rest of the offerings out there in any language.

I can bring upcoming technologies into Spring and later swap it with others if needed. Without disturbing the underlying architecture.

You could use Spring framework for web applications. You could use Spring as an MVC framework which is only one part of its offering. You could use it as a backbone for integrating all layers.

Spring provides full stack flexibility in my projects that is hard to come by in ANY language or a framework. The thriving community has a plethora of plugins to integrate with most other prominent tools.

You could take these same criteria, apply it to any language and identify winner amongst them. Remember your winner may be different than someone else’s winner for the same criteria.

相關推薦

使用合適框架 自己需要4事情

We write if-else, switch, while, AND, OR and equalsIgnoreCase more than we know.  Our business logic depends on them. We also do some reading from / w

myeclipse更換工作空間需要事情

1. General --> Workspace --> UTF-8 2. General --> Editors --> Associations --> JSP --> MyEclipse JSP Editor 3. 搜尋jsp --> UTF-8 4.

cocos2dx為提升引擎效能所4事情

1.SpriteBatchNode將所有的子元素組織成一個BatchCommand,一次性發給OpenGL進行繪製.2.getChildByTag通過比較整形,而非字串的方式來查詢節點.3.Node的v

spring容器加載完畢事情(利用ContextRefreshedEvent事件)

ref refresh display ras 方案 splay 區分 容器 and 關鍵字:spring容器加載完畢做一件事情(利用ContextRefreshedEvent事件) 應用場景:很多時候我們想要在某個類加載完畢時幹某件事情,但是使用了spring管理對象,我

【cuseronline的專欄】我想,一個人,若肯花三至五年的時間,專注的去事情,總會有一些成績的吧。

技術方向1: Eclipse平臺技術愛好者,實踐者,5年以上Eclipse外掛、RCP開發經驗,對Eclipse外掛、RCP有深入的瞭解。熟悉Eclipse外掛,RCP,GEF,JDT,AST及IDE開發,瞭解EMF,OSGI,對程式碼自動化生成及MDA等也有一定的經驗和實踐。閱讀和研

新手要想學好Linux系統就必須做好這4事情

一般情況下,大部分人接觸Linux的機會並不多,對Linux平臺下的開發更是一無所知。而現在的發

李愬雪夜襲蔡州:挽救唐朝國祚的關鍵之戰(先示弱於敵軍,對降將攻心為上、以誠待人,然後逐步收集情報,最後出奇兵奇襲。但出奇兵也要有預案,否則會被兩面夾擊。件事情真不容易)

嚴重 答案 發現 指揮 主力 否則 持久 感恩 十月 元和十年(815年)六月 宰相武元衡遇刺後,唐憲宗任命裴度為宰相,讓他繼續挑起平定淮西的重擔。 裴度對憲宗說:“淮西是朝廷的心腹之疾,不能不除;而且朝廷既已出兵,兩河藩鎮都在密切關註事態的發展,以決定他們的

如何按一個系統分析師的方法去事情?

要想按分析師的方法去做事,首先要知道系統分析師要具有什麼樣地能力呢?做為一個合格的系統分析師,以下能力是最基本的:       1.如何去發現一個問題?       2.如何根據問題去搜集相關資訊?       3.如何去界定一個系統的範圍?       4如何為一個需求點,

安裝完最小化 RHEL/CentOS 7 需要的 30 事情(二)

and 腳本語言 clas 普通用戶 進一步 data gcc 編程語言 col 本文導航 -7. 安裝 PHP0 -8. 安裝 MariaDB 數據庫 -9. 安裝和配置 SSH 服務器 -10. 安裝 GCC (GNU 編譯器集) -11. 安裝 Java

在配置完 Exchange Server 2010 CAS Array需要的兩

在配置完 Exchange Server在Exchange Server 2010中如果希望實現CAS角色的高可用性,則需要通過配置Network Load Balacing來實現,該步驟非常容易,但當我們創建完CAS的NLB後,還有兩個重要步驟進行操作。 第一: 創建CAS Array,利用New-Clie

安裝Kali Linux 需要的 20

【51CTO精選譯文】我在本文中整理出了安裝一份全新的Kali Linux後總是要做的若干件事情。由於我有多臺膝上型電腦和工作站,所以儘量擴大下列操作步驟的適用範圍,以滿足每個人的需求。這是我在安裝Kali Linux後做的20件事情。你的需求可能全然不同。要是有什麼建議,歡

安裝 Kali Linux 需要的 20

【51CTO精選譯文】我在本文中整理出了安裝一份全新的Kali Linux後總是要做的若干件事情。由於我有多臺膝上型電腦和工作站,所以儘量擴大下列操作步驟的適用範圍,以滿足每個人的需求。這是我在安裝Kali Linux後做的20件事情。你的需求可能全然不同。要是有什麼建議

你真的知道自己每天都需要什麽嗎?

原則 是你 根據 大學 wrap 註意 分鐘 音樂 畢業   文/黑天鵝圖書   你真的知道自己每天都需要做什麽嗎?如果你覺得一天8小時不夠用,很有可能是你沒有把時間用在重要的地方上。現在開始列一張清單吧,讓你的一天過得更加輕松高效。 工作清單讓職場更高效

碼農的奮鬥之路 窮爸爸富爸爸系列-致富需要的六事 讀後感

財務 提升 解決辦法 個人發展 tor 註意 重要性 targe 進行 很多人在財務上掙紮,他們只知道為錢而工作,但卻從未想過如何讓錢為自己工作。每個人都該思考的問題!!! 第一件事 做好為財務自由付出努力的準備 安穩的代價

安裝完最小化CentOS 7 需要事情

alloc 一個 systemctl rtu hosts 初次安裝 link 查看 端口 推薦博文: VirtualBox安裝CentOS7步驟詳解: https://my.oschina.net/AaronDMC/blog/840753 如何安裝CentOS7字符界面

[js高手之路]html5 canvas動畫教程 - 自己動手一個類似windows的畫圖軟

箭頭 erb 寬度 pow(x type row center shape htm 這個繪圖工具,我還沒有做完,不過已經實現了總架構,以及常見的簡易圖形繪制功能: 1,可以繪制直線,圓,矩形,正多邊形【已完成】 2,填充顏色和描邊顏色的選擇【已完成】 3,描邊和填充功

html5 canvas動畫教程 - 自己動手一個類似windows的畫圖軟

.cn pic 箭頭 uid .com 教程 amp 設置 一個 制直線,圓,矩形,正多邊形【已完成】 2,填充顏色和描邊顏色的選擇【已完成】 3,描邊和填充功能的選擇【已完成】 後續版本: 橡皮擦,坐標系,線形設置,箭頭,其他流程圖形,裁剪與調整圖形。。。。。 終極目標:

centos7 安裝需要事情

bucket login timewait rec 長度 install fire 修改主機名 之前 安裝centos 7 系統之後要做的幾件事 #修改主機名 hostnamectl --static set-hostname xd-1 #下面是使用iptables

iOS - Target-Action機制創建自己的UI控需要了解的知識

sse devel 並不會 from 開放 針對 實測 域名 uislider 我們在開發應用的時候,經常會用到各種各樣的控件,諸如按鈕(UIButton)、滑塊(UISlider)、分頁控件(UIPageControl)等。這些控件用來與用戶進行交互,響應用戶的操作。我們

完100+外包項目,我用4維度提問法搞定產品需求

方式 外包 是否 在線客服 範圍 新的 傳統行業 找到 時間 產品需求溝通你知道怎麽開始嗎?如何快速獲取和了解客戶的真實需求,並確保信息的完整度、準確度是一個非常重要的技能。我在做過100多個項目後,將溝通方法總結如下。 “做了一年的需求,最後產品竟然不是甲方想要的!”今天