开发者

How to add jQuery to a framework without break it

We have a framework based in C# + XSLT + javascript, that is used as a base for the projects of the company.

The company has announced that in a few days I will be the responsable of this framework. The objectives are:

  • Repair bugs
  • Add new features

The problem is this framework has a lot of bugs, there's not documentation (none, zero), contains bad practices of code, and some antipatterns. (Also doesn't use any naming conventions).

One of the first things I thought was starting for the javascript part, and add jQuery library for use the functions of jQuery for DOM access, XML manipulation and AJAX calls and other stuff, because some of the actuals are buggy.

I'm afraid to be the "so-clever-guy-that-refactors-and-breaks-the-project" and i have to be so careful, because this framework is used in a lot of projects, and breaking the framework would be "so much visible".

How can st开发者_开发技巧art to adapt the code to works with jQuery?


The problem you have is not really specific to jQuery. When making changes to a working system, some application of good coding practices is required:

  • Create Development and Test environments separate to your live environment
  • Create test scripts for parts of your system that you know to work correctly at present (consider Selenium for automated browser-side testing)
  • Work steadily, making individual changes and testing continuously (look into TDD)
  • Use version control software (e.g. Subversion) so you can roll back if necessary.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜