l*s 发帖数: 783 | 1 vs 2005 provides some basic funtionalities of refactoring, and vb.net
project has more features than c# regarding this. |
|
p*a 发帖数: 592 | 2 要分,容易写test或者refactor
..? |
|
k**n 发帖数: 3989 | 3 呵呵,, 这个其实很难的.
比如single responsibility ,大家都认为很容易,但在实际上没有TEAM会真正做好。
而且每个人对singled的界定不一样。
OpenClose, 估计刚学oo编程的人就只到。但实际什么时候该用,如何用,还是简单的
if switch就能满足。
至于后面的。。就更难了。
学习一点用IOC的实例可能会帮助理解。但实际工作中用IOC需要整个team都能明白才行。
我觉得想进行solid的实践,从学习写unit test,并用一些mock工具比如moq, 并
refactor你现有程序开始, 比较实际可行。 |
|
c*********e 发帖数: 16335 | 4 現在公司里整天在提solid,refactoring,想把web form application改成mvp或者mvc架
构。 |
|
a**2 发帖数: 123 | 5 知道有些人还在怀疑html5, 能否胜任哪怕最简单的游戏. 其实完全不必要担心, 有这
么多的HTML5饭, 有W3C标准组织的撑腰, 更有苹果, 微软和Google这些大佬的支持, 可
以预见, HTML5不会是孤孤单单登上舞台的, 马上就会有另外相配的标准和开发工具出
来, 一起掌声迎接HTML5时代的到来.
你首先想到的是图形函数库, 这已有了, 名字叫做webGL. 这是基于JavaScript API,
并能应用硬件加速三维图形进行渲染的图形库, no plugin, 无兼容性问题, 所有的浏
览器通吃! 其他的一些问题, 譬如websocket和很多refactoring等等, Google都已经做
了试验, 并彻底解决了(有钱确实好).
为了炫耀和测试html5的潜在的能力, Google的一些软件工程师用他们自己的Web
Toolkit开发了第一人称枪战游戏QuakeII, 它的引擎是基于开源Java的Quake引擎Jake2
http://bytonic.de/html/jake2.html, 以此为蓝本, 应用他们的Web Toolkit和webGL, webs |
|
G**Y 发帖数: 33224 | 6 一般操作系统是不是,开始很小,然后补丁加补丁,到最后就大的不得了。
像windows/linux的这么大的东西,里面是不是充满垃圾啊。
你们搞软件工程的,有没有好办法,在不影响功能的前提下,优化内核,refactor程序。
当然这个估计比重写操作系统还难。呵呵。
这种费力不讨好的活,好像从来没人干。 |
|
c******n 发帖数: 16666 | 7 感觉还是那个程序的优化没弄好 不知道ddr4会不会好点
我以前有个大的模拟程序 就有这个问题 但是因为是多年多人的老代码 refactor起来
繁琐+各种非技术障碍 最后直接扔aws拼硬件了
或者其实算是UX问题,既然已经到了内存大量读写阶段才卡 这都不算普通IO瓶颈了
考虑到一个核都没满 还不如gui全部锁掉 然后跳个扫雷让你玩。。后台处理好了再恢复
乐观一点吧,我还遇到过小众niche类的商业软件 遇到大的数据量(其实也就十几个G
)随机崩溃的问题。看界面感觉就是啥大学教授做的,闭源,木有客服,当时跑起来我
都要祈祷千万别崩了
io |
|
f***o 发帖数: 31 | 8 no, it's the original naming convention; like the famous concurrent
package, is EDU.oswegen... today, it's one click to refactor those, but.. |
|
n*****k 发帖数: 123 | 9
It is buggy, but I never use it to do GUI stuff. So it is OK for me, I like
the new UML refactor, EJB designer and archive builder, test client are pretty
cool too.
is
and |
|
c*****a 发帖数: 15 | 10 "Refactoring Imporving The Design of Existing Code" by Martin Fowler.
之 |
|
e***g 发帖数: 158 | 11 are you gonna refactor by jedit? :) |
|
n*****k 发帖数: 123 | 12
Just tried IntelliJ Idea, very slow, much slower than JBuilder9 which I am
using right now. I am not saying JBuilder is fast, but with a powerful
machine, it will do you jod quite good.
Except speeds, IntelliJ Idea is a pretty good IDE, lots of very good features.
A very powerful Refactoring tool. Not bad at all.
The fast Java IDE, I believe is Eclipse, a GUI structure similarly to .NET
Window form. But right now it is not as powerful as otheres.
Just wonder if Sun will ever include SWT into th |
|
g*****n 发帖数: 37 | 13 What is refactoring tool?
what is SWT? |
|
w********c 发帖数: 2632 | 14 What does IntelliJ have? In eclipse, refactor only covers rename and move.
SWT is the Standard Widget Toolkit, the native widget library IBM acquired
from OTI.
features. |
|
m******t 发帖数: 2416 | 15
Most IDEs have built-in refactoring tools you can use. |
|
r********u 发帖数: 3 | 16 Use Idea IDE to refactor it.
Safe and Fast |
|
c*****t 发帖数: 1879 | 17 I like Eclipse very much. If you write a not so small Java project,
refactoring/reference searching is vital. This reason plus the fact
that it is free, makes it hard to be beat.
JB seems to be very hard to configure properly, and it is not free
(the free version is old and slow w/ poor GUI).
The best Java IDE is IntelliJ IDEA, current version is 4.0. If you
have used it, you will see why it is the best. It is better than
Eclipse in every single area, but unfortunately it is very costly
as w |
|
KG 发帖数: 515 | 18 If every class is 3000 lines, why don't you refactor it to a number of smaller
classes. I wouldn't write such a lengthy class, which could be nightmare for
maintenance purposes. |
|
r***l 发帖数: 67 | 19 Eclipse is free and has a huge user base, however Eclipse does not have a good
JSP plug in. Don't think it's a problem. Lot of developers prefer to code JSP
without using fancy IDE support.
IntelliJ is the most powerful java IDE I have ever used. The refactor fuction
is awesome. It is not free though.
So for your case, go for Eclipse. |
|
c**g 发帖数: 274 | 20 JBuilder我用的时间不长, 感觉不错. 我现在稳定在NetBeans的重要原因是我最近
做Web比较多, 又懒得下各种各样的plugin. 而我想要的功能, 编辑器, CVS支持,
ANT支持, Junit支持, 内置tomcat, 简单Database browser等等Netbeans基本
一次download全部搞定. 另外4.0 还加了refactoring, 速度也比3.5/6要快.
还有就是, IDE习惯了一套, 基本上懒得去学别的, 我最早的时候一直用Emacs + JDE,
用了很久. |
|
g**********y 发帖数: 14569 | 21 Yeah, SCEA. After the test, another learning is: you've got to know tons of
acronyms. Now I know most of them, but mixed up all the time :-)
Because question is randomly drawn from library, I happened to get 31 & 32
with exactly same question, just rephrase:
31. What increase software maintainability?
32. What improves software maintainability?
And both answers are:
A. Code refactoring
B. Component Re-use (Software Re-use)
Reminds me of a college probability exam my friend took:
30000个体户里有8个偷漏税, |
|
p***p 发帖数: 559 | 22 What does it mean? what is and how when can I use Wrapper? F.E HttpServletRequestWrapper
对于一些没有源码或有很多替代方案的第三方库来说,我们往往希望通过自己写一个Wrapp
er来过滤掉本系统内使用者对这些库的真正引用.
在servlet中HttpServletRequestWrapper,HttpServletResponseWrapper两个Wrapper使我
们重用request\response接口非常方便,如果没有这两个类,我们就要自己写很多代码,
麻烦。
过去我曾经想编写一个Rowset的实现,但要实现的方法太多,泛懒---放弃了.:(
今天又要做一个Wrapper我于是google: generate wrapper .......很多结果,但都不只所
云 :(,
在eclipse中翻了个遍,OK!终于在 Source菜单中找到generate delegate methods....
先用refactor (重构)菜单中的 Extract Interface...将第三方库中的有用 |
|
c*****t 发帖数: 1879 | 23 ft, don't tell me that it is your first day of using refactoring. |
|
c*****t 发帖数: 1879 | 24 I think that for your problem:
1. Break them down into categories and have an object that represent
each category (and thus put attributes in that category only).
Then, you pass categories around.
Rarely you would create new categories of data, so, adding new
parameter only affect the data structure of categories object per se,
not any signatures of function calls. Thus saving you the refactoring
trouble.
2. Depending whether or not you clone the category object often, as well |
|
c**g 发帖数: 274 | 25 1) use a refactoring tool.
2) could you share a real life example? Most cases you can design
such a way to avoid passing many parameters between differenct
classes, which is not a sound oo desgin in general. |
|
m******t 发帖数: 2416 | 26
If A should run before C is part of the logic flow, shouldn't you
have some _code_ capturing/enforcing it, instead of just documenting
it?
I would also rely heavily on rigrous testing, which always goes
hand in hand with active refactoring. "A has run" can be a precondition
for C's test cases.
Also, it would never hurt to throw in a couple of asserts at
the beginning of C if it's so important.
While it certainly needs to be well documented, documentation, by
its nature, is explanatary rather th |
|
g**********y 发帖数: 14569 | 27 How would you write code to enforcing this logic --
A depends on XML Document object "doc" be untouched;
C will modify some nodes within "doc"
so now A should run before C
After refactoring, A become A1 + A2 + A3, actually, only A2 needs "doc" be
untouched.
And C become C1 + C2, only C2 will modify "doc".
So now, A1, A3, C1's running order is not important any more. But A2 needs to
run before C2.
I find this kind of situation happens a lot when working in a huge project.
Especially some code is |
|
m******t 发帖数: 2416 | 28
call
Hmm, refactoring does not change logic flow, right? Say, even you
split C to C1, C2, and C3. What used to be:
C(target);
would simply be replaced with:
C1(target);
C2(target);
C3(target);
I see your point in general. I guess I would still rely on regression testing
to ensure the logic isn't changed. In this case, C doesn't really
require A to be run before itself, because it doesn't really rely on
anything A puts in target. It's the logic block that uses A and C needs
to be regression test |
|
m******t 发帖数: 2416 | 29
"
Maybe rename it to something else using Eclipse (I believe Netbeans or
IntelliJ support it too) refactoring? |
|
R*******r 发帖数: 104 | 30 refactor under eclipse, should be very safe to do simple rename.
" |
|
g****c 发帖数: 299 | 31 there is refactoring tool in netbean too
and
them. |
|
R*******r 发帖数: 104 | 32 Will give you warning if it feels something could be wrong.
For simple refactoring like rename, I'd say it's pretty safe,
if you don't have compilation problem, you are done.
and
them. |
|
m******t 发帖数: 2416 | 33
Well, the whole point of "them" going away is that they are not doing any job,
right? 8-) |
|
s*******k 发帖数: 20 | 34 Hehe, thrilling solution. Thanks.
Subsequent question would be: Who is gonna take over the job before they get
off radar? upstream or downstream?
often |
|
s*******k 发帖数: 20 | 35 Noooo :P, the whole point is that they are not doing much enough job. Say,
some of them carry only one or two method, well, inherited and widely used by
its children classes.
job, |
|
c*****t 发帖数: 1879 | 36 Well, if your do refactoring without SVN integration, that's
going to be a major pain in the rear... |
|
h**d 发帖数: 474 | 37 By the way, if you use continuous integration, and have frequent checkins,
it should not be a big pain unless you r doing really big refactoring... |
|
c*****t 发帖数: 1879 | 38 Well, if your do refactoring without SVN integration, that's
going to be a major pain in the rear... |
|
c*****t 发帖数: 1879 | 39 You can set IntelliJ IDEA s.t. it will use your default choice
of whether or not adding the new file (via "new" or copy/paste
a file or refactoring) to cvs/svn. |
|
c*****t 发帖数: 1879 | 40 You can set IntelliJ IDEA s.t. it will use your default choice
of whether or not adding the new file (via "new" or copy/paste
a file or refactoring) to cvs/svn. |
|
L*********r 发帖数: 92 | 41 "Design Pattern" 很经典. "Refactoring"个人认为只是有一些帮助, 也许每个人的理
解不同. 不喜欢smalltalk 和它的子子孙孙.
写code就如同写小人书, 让每一个人都可以读懂. 如果要写注释, 那就应该重写code.
做起来不容易呀. |
|
g**********y 发帖数: 14569 | 42 >> One interesting thing about JavaScript is that there is not a unique way
doing inheritance, which can be confusing and annoying.
This is pain for communication. I remember a nice suggestion in coding style
that convention might be, it is still way better than multiple ones co-
exist.
>> I find that composition in JavaScript is easy and good OOD usually can
be good enough.
I can live with composition only as well. But I can't live if there is no
good refactoring tool. It will kill me to track |
|
h**d 发帖数: 474 | 43 haha...sometimes, rewrite is easier than refactoring:)
For that kind of code, I normally treat them as blackbox.
If I have to modify them, I just write kind of integration(instead of unit)
tests for the piece which I had to touch. Anyway, it's nightmare |
|
c*****t 发帖数: 1879 | 44 I think that every ide that has refactor engine comes with this feature. |
|
B******N 发帖数: 445 | 45 等你用ejb3,跟ejb2比较起来你就会appreciate it啦。
你可以完全开发POJO,然后加上annotation,再refactor a little bit。就变成一个
j2ee service啦。no boilerplate code啦。 |
|
g*****g 发帖数: 34805 | 46 and right click->refactor, a lot of options. |
|
G*O 发帖数: 706 | 47 多谢两位。
过去一直不懂refactor啥意思……,呵呵。 |
|
x*********o 发帖数: 120 | 48 It has this function.
When you use 'refactor'->rename, it will pop dialog.
Select the 'Update reference'. |
|
A**o 发帖数: 1550 | 49 it happened that i just suggest some coworker to do the same
this afternoon. however, the coworker's refactoring proposal
was denied. so nothing would happen.
mentioned |
|
h******a 发帖数: 46 | 50 I would first do more bussiness requirement rearch, something like what's
the relationship of the 7 products? any business similarities? how is client
going to use them? who is going to maintain this project? etc. then you
might have better ideas of how to implement it. btw, you can always refactor
it in the future.
suggetion
analyzing
products |
|