question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It is time to do some refactoring to get a better structure and improve extensibility. In this issue I want to collect ideas and wishes from you to get the best from this huge step (which will result in JSXC v4.0). It will probably last a couple of month and every line of code will be touched. My goals for this project are the following in descending importance:

  1. Make the code testable (fix #191 )
  2. Smaller files
  3. Improve tab communication (fix #328)
  4. Improve security (XSS, …)
  5. Easy & durable integration
  6. Easy extensibility

To reach the goals I propose the following changes:

  • Use TypeScript with modules
  • Use more objects (stricter encapsulation and smaller functions)
  • Use promises instead of callbacks
  • Create new tab communication
  • Create public API with versions (e.g. jsxc.api.v1.start)
  • Create message pipes for incoming and outgoing messages

Additionally I would like to think about the following points:

  • Is Grunt still state of the art? I feel comfortable with it, but maybe there is a better solution which fits our needs. (Gulp, webpack,…)
  • The css naming is quiet uncommon and inconsistent. I am inclined to something like jsxc-roster-toggle instead of jsxc_rosterToggle.

I would love to hear your thoughts @LEDfan @MarcelWaldvogel @Zauberstuhl @johangm90 @dimaursu @nitmir @ChristianTacke @dteleguin @skyfox675

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
krazyjakeecommented, Mar 27, 2017

I won’t argue, but I will say that I was VERY wrong about coffeescript and that crap can burn in hell.

1reaction
mmoquicommented, Mar 7, 2017

In the way of improving the code: a better decoupling between the UI and the engine by using, for example, the events.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refactoring
Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.
Read more >
clean your code - Refactoring.Guru
Refactoring is the controllable process of systematically improving your code without writing new functionality. The goal of refactoring is to pay off ...
Read more >
Code refactoring - Wikipedia
In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the factoring—without changing ...
Read more >
Refactoring - Martin Fowler
Refactoring is a controlled technique for improving the design of an existing code base. Its essence is applying a series of small behavior-preserving ......
Read more >
What is Refactoring (Code Refactoring)? - TechTarget
Refactoring is the process of restructuring code, while not changing its original functionality. The goal of refactoring is to improve internal code by ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found