I think I get what you're up against. Of course I'm not in your shoes, but
I wouldn't be so shy if I were. This is an almost mechanical refactoring.
What will you do when you have real tough refac's to do, that involve
conceptual/architectural changes?! You wrote you just migrated your app to
qooxdoo 1.5, so you have to fix all kinds of issues anyway. A good
opportunity to do some clean-up :-).
> I cant convert it to a static class because the developer than creates
> basefile.js used the base namespace as class, I mean the source is like:
> myapp/
> source/
> class/
> myapp/
> ui/
> Window.js
> Message.js
> myapp.js
Why don't you just move this into the myapp folder, and christen it, say,
myapp.Myapp:
qx.Class.define("myapp.Myapp", {
statics : {
> init: function() { ... },
> callServer: function() { ... },
> getMessageBus: function() { ... },
> ...
}
});
It has a finite number of methods, so it's just a matter of doing for each
a global search-replace over the code base, e.g. of the form
s/myapp.init/myapp.Myapp.init/
> myapp.init();
> myapp.callServer();
> myapp.getMessageBus()
> And I cannot change the code because the functions are used so many times
> inside the code and the code is like 5MB when compressed so I hope you
> understand I cannot make a replace-in-files without breaking something I
> dont know.
>
So you have 5MB code, compressed. Let's suppose each of the methods are
called 500 times in the entire code base. - So what?! Replacing them
individually makes the change very precise, little chance for misses or
false positives. It's mechanical.
> And also like:
>
> new myapp.ui.Window();
> new myapp.Message();
Those won't get hurt. And if there are actually a few issues you should be
able to sort them out quickly by hand. If you're super-nervous you can do
it step-wise, keep the old basefile.js and migrate one method at a time,
test, fix, then the next.
> If there is some way to tell qooxdoo to compile a file called as the
> library
> namespace this will be great to me, but I did not found a way to do it.
No, that's not a good idea. Rather, move it into the name space.
Good luck,
T.
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel