【正文】
(funs)。 }. 角色添加如圖所示 添加角色是比較關(guān)鍵的部分,修改角色對應(yīng)的目錄和功能,只能將原有數(shù)據(jù)刪除然后重新插入代碼如下:String sql1 = delete from oa_roles_menus where role_id=?。// 刪除功能語句String sql2 = insert into oa_roles_menus values(?,?)。// 插入功能語句 stat = (sql1)。// 插入刪除值stat2 = (sql3)。// 插入刪除值()。stat3 = (sql2)。39。s the crowd that says, Hey, wait a minute. You can39。t be built! The One True AnswerSo which camp is correct? Those who prefer hacking around in code, or the those who insist on fully modeling their perception of the world before even thinking about code? Well, in a way, they are both right. At least, they are trying to solve the same problemgaining sufficient knowledge to correctly implement a system. See, a software project is unlike projects in other engineering disciplines. Software projects are inherently projects of discovery. You and your team will learn more as time goes by. Your knowledge of the customer, the application, the environment, the sponsoryou will e to know much more about each of these topics as you go along. And you must be prepared to act on that newfound knowledge. The error of the classic waterfall approach is that there isn39。t build it as a perfect structure that will never collapse. Instead you build it to withstand 500 year winds, 200 year floods, 300% expected maximum load, etc. If you didn39。 when do you model and when do you code, and so on. Different methods will suggest different ways of attacking this problem. Methods R UseXtreme Programming is based on the premise of mitigating risk, and in a way, so are all the other popular design methods of the daywhether they admit to it or not. Published methods attempt to answer the question ``How do I and my team gain the most knowledge about the problem and solution domain in the most economical way possible in order to create a software system?39。 Clearly, risk is inherent in the discovery process of a project. But that discovery is ongoing, and we can39。ll need to know upfront and understand it perfectly. It will never happen that way, of course, so every method tries to create an environment where you can make the important discoveries as early as possible. The golden Answer of a particular method is based on how to lower your risk of making crucial, late discoveries. But those answers will be different for everyone. The answer depends on your team, your project, your experience, your problem domain, your work environment, etc. Once you have found a method that works well for one project, there is no guarantee that it will work well on the next. If any of these listed factors change, your process will likely need revising. It ain39。t perfect. Processes and methods depend on people to carry them out and to understand the material being examined. And people are fallible. So in the end, it es back around to the idea of managing tradeoffs. You could spend six months on a project diddling around with an object model, only to discover that you misunderstood the customer39。t support important requirements that you haven39。 we must live with tradeoffs concerning ourselves. And then we can proceed to develop software. 文獻(xiàn)翻譯你是怎樣開發(fā)軟件的?在那些以編寫軟件為生的人們之間有一個常見的爭執(zhí)。然后,就會有另外一群人說,嗨!等一下。你必須得編寫某些形式的代碼。正確答案那么哪一方正確呢?是整天侵淫在代碼之中的那一方呢?還是堅持在思考代碼前必須先完整地建立對世界感知的模型那一方呢?嗯,他們在某種程度上都是正確的。請注意,軟件項目和其他工程學(xué)科中的項目不同。隨著時間的過去,你和你的團(tuán)隊會學(xué)到更多的知識。你必須得做好適應(yīng)新發(fā)現(xiàn)的知識的準(zhǔn)備。在瀑布模型中,低層編碼中的任何發(fā)現(xiàn)根本無法影響到需求和架構(gòu)。降低風(fēng)險降低風(fēng)險是傳統(tǒng)工程的核心。相反,你只會考慮它能經(jīng)受500年的風(fēng)吹、200年的水淹、最大3倍于所期望的承重,等等。工程的全部就是做這些折中,軟件工程也是如此。原因就是其發(fā)現(xiàn)的本質(zhì)。那些直接去拼湊產(chǎn)品代碼的人在開始之前就已經(jīng)陷入麻煩之中:(由增加的知識所導(dǎo)致的)方向上大的變化此時更改起來最為困難,也最為昂貴。作為現(xiàn)實抽象版本的模型,必然會失去一些細(xì)節(jié)。于是,就有一些人試圖在這兩個極端之間進(jìn)行平衡,他們建立一點模型,就進(jìn)行一些編碼,他們使用一次性的原型或者代碼曳光彈進(jìn)行建模。針對這個問題,不同的方法會給出不同的建議。已公開的方法都在試圖回答下面問題:“為了創(chuàng)建一個軟件系統(tǒng),我和我的團(tuán)隊如何才能以最為經(jīng)濟(jì)的方法獲取最多的問題領(lǐng)域和解決方案領(lǐng)域知識。然而,該發(fā)現(xiàn)是一直在進(jìn)行的,我們無法承受游戲后期的重大發(fā)現(xiàn)。現(xiàn)實肯定不會是這樣的,所以每個方法都試圖創(chuàng)建出一個環(huán)境,在其中你能夠盡可能早地做出最重要的發(fā)現(xiàn)。不過,這些答案對每個人來說都是不同的。如果你曾經(jīng)發(fā)現(xiàn)一個方法很適合于一個項目,誰也無法保證它會適合于下一個項目。它并不完美你已經(jīng)看到,和算法或者堅固的機(jī)器指令序列的質(zhì)樸之美不同,它并不完美。而人是很容易犯錯誤的。你可以在一個項目的對象模型上浪費6個月的時間,結(jié)果在實現(xiàn)期間卻發(fā)現(xiàn)你錯誤的理解了客戶的性能需求?;蛘撸憧梢詫?quán)衡進(jìn)行評估以最小化總的風(fēng)險,接著分析一點、設(shè)計一點、編碼一點。不存在在任何時間、任何場合都正確的答案。所以,當(dāng)你下次進(jìn)行計算機(jī)是工程實踐還是藝術(shù)的討論時,請考慮一下權(quán)衡的藝術(shù)。然后我們就可以開始開發(fā)軟件了