Wednesday, September 13, 2006

collapsible panel

Given the limited real estate on my web ide i was looking for a method to hide sections of content,
for example do you always need to see the list of files in a project?

I've come across this link
http://atlas.asp.net/atlastoolkit/PanelExtenders/CollapsiblePanel.aspx

to an atlas collapsible panel, this could be very useful, especially if i can update the html within the panel using a client side webservice call, which is what i do with standard .net panels at the moment so i can't see it being a problem.

ide

made a small bit of progress of imperceptible progress last night and today basically readin up on the membership and role providers, to a tets solution set up apart from my pet project so i can fiddle around with roles etc.

I was thinking about wrapping the ide page in a loginview control, no0t sure about the whole hardcoding separate role views withint the control. this would be good if you can programmatically say on the load "you can view this, you can't and neither can you", but the stuff i was reading only mentioned declaring the role elements within the loginview control at design time, which would be a bit useless, considering users could be adding new roles all the time, sop any hardcoded roles would quickly become out of date.

Also started implementing some of the database design, the pain (i foresee) is going to be marrying up my schema to the membership (and profile if i use it) schema. we shall see.

Tuesday, September 12, 2006

web ide pet project progress

well i've been making slow but sure progress on my new pet project in my lunch hours.
I've got the first bit of functionality woring pretty much how i want. you can now enter code in pretty much any language i can think of, click a button and it will be higlighted and displayed to you so that you continue editing.

Im pretty happy with this apart from the fact that the fckeditor rich text box that i use seems to be defaulting to a specific size. and no matter how i manipulate the html around it, it won't get any bigger.

I've got most of the layout sorted now, its basically 4 table cells. one for your code, one to display all the other people cwatching you code, one to display the code of someone you have selected from the list of watchers and finaly one to display "other stuff", at the moment this may just be a list of files associated with the project.

Which brings me onto the next thing i'm thinking about, really getting down my db design. i've been thinking it'd be nice if you could have a Project, which could have many files (maybe classes, maybe not) related to it.

i've also been thinking about how the relationships between developers and projects will work. that seems to be a many to many relationship (a developer can work on many projects and a project may have many developers) so it'll need what i call an intermediary table.

But the bit i'm not sure how to implement is the idea of having public and private projects, a developer may start a projects and not care who watches, on the flip side a developer may start up a project and only want specific people to be able to participate on the project.
maybe this is getting into role based territory, if you are authenticated and in a specific role then you can view the project?

but then who assigns the roles? maybe when a developer creates a project they get presented with a list of developers, from that they themselves can assign the roles?

which then moves me onto the another thign i'll have to tackle. i've yet to get to grips with the whole asp.net 2 role/membership/profile providers model. mainly cos i think its a bit wank, in terms of blobfying the data, so you can't write queries against it. but maybe this is the answer for what i need to do.

i think i feel some reading coming on

Monday, September 04, 2006

New pet project

I have started work on an online coding/collaboration tool written in c# 2005 and using atlas.
I started thinking about this after reading thru wilco's code for a multi language syntax highlighter
(see last blog post for link).

My idea is to have a pane in which you write your code "MyCode" , a pane displaying people who are watching you code "Watchers" and another pane which will display a Watcher's code that you have selected from the "Watchers" pane.

The idea is that you can write code, click a button to get the syntax highlighted, other people can see your code as you submit it to be higlighted, the watchers can comment on your code, you can see their suggestions in near realtime (the time it takes to save their code to the database and for a the javascript timer to call a webservice to retrieve and display the results from the database)

I think this could be sueful in a distributed team environment, if one of your team are stuck on a problem.

So far i've got the basic layout that i want (using tables i know i should use css for positioning but it is a mock up). I've also got the basic javascript calls to the main webservices sorted (they just return strings at the moment). One thing that i compleletly didn't think about, that i've now sorted is how i'm going to display the code. the syntax higlighting code i will be using returns strings of code with html formatting, i was originally going to use a textarea to allow the display and editing of code until i realised that you can't display html within a textarea doh!

a few hours googling and i've come up with http://www.fckeditor.net
a really nice, very customizable, open source, rich text box.
I've managed to get rid of all the unwanted toolbars (i want it to look just like a textarea)
and worked out how to programmatically (in javascript cos this apps all ajax'd up the wazoo) add text, return the html and return the content without the html using the browser's dom,
this last one is really important as the syntax highlighting will be carried out in the following way:

1-user types in some code

2-user clicks button (or keyboard shortcut, i might add this in as a nice to have) to get syntax highlighted.

3-button click fires javascript function

4-javascript function passes contents of textbox to asp.net webservice (registered vioa atlas scriptmanager control)

5-webservice parses code and returns a string of html (the formatted code)

If the string of code contains html then i would have to write something to enable the webservice to remove the html from the string before i could highlight the syntax. yeah this is doable, with a bit of regex, but all the regex examples i've seen never work 100% on html
so its nice to know i don't have to worry about it and that a simple function call to the fckeditor gets me exactly what i want.

Next up is to integrate the fckeditor fully into my ui then i can start work on a simple database model (i've sketched the basic concepts and relationships out, i just need to decide on the datatypes), after the db design is done i can then start writing the stored procedures and data access code, then code the fully functioning webservices that will be called by the ajax client.

its probably at that point that i'll realise how much this app canes the database when you've got
several coder hacking away, expecting near realtime updates on what the other coders are doing. For now i'm happy to use this project as an excuse to fiddle around more with the atlas controls (i've alerady decided the timer control is shite because it only seems to fire server side events (involving a postback) and i can't get it to call a javascript function, so i've stopped using it in favour of the bog standard javascript timer, which does the job perfectly.