Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Client side integration options

Hi John,

See my comments/answers below...

John J. Barton wrote on 2011/01/19 10:25:28:
> Suppose I have a browser-based Web debugger: how can I use Orion to edit
> source based on links available in the browser?


There's a related question of how we can synchronize breakpoints and potentially other debugging-related information, but it's a good idea to focus on editing first.

> > Based on what I have been able to discover so far, Orion serves from the
> file system, rewriting the base of the file name with an http url.


Yes, that is how the Orion server works at this point. I could imagine it editing files that are not in the file system. It could also be the case that the URLs known to the browser (and the debugger) are different than the URLs used for editing the files, for example if you are using a build, or some kind of server-side templating mechanism.

> So one path is have a URL rewriter on the debugger side, that break off
> the browser's base URL and prefixes Orion's:


This would work today, but as you point out it would have to be configured by developers, probably for every project. Also, the URL rewriter could become very complex, if we wanted it to cover cases like builds (concatenated and/or minified files).

> Another path is to attach an editor URL to served files. That's a fine
> solution in the long run, but it means getting servers to agree.


Don't you think it would be possible to get servers to agree eventually? Someone would have to start using this approach, and Firebug is in a good position to be that "someone" ;-)

> Another could be a top-level Orion URL for looking up files, eg
> http://localhost:8080/findFile?path=content/firebug/external/
> changewebeditor.js&


This also would mean that servers would have to agree. I am not sure which solution I like better, my gut feeling would be to avoid solutions that rely on URL manipulation. On the other hand, a top-level URL might be easier to do for existing servers that are hard to change.

> Other ideas?

Not really. I am eager to make progress though. Let me know if I should add something to Orion to enable experimentation in Firebug!

Boris


Back to the top