Rails, for example, has a defined set of patterns it uses to define ids and other attributes in html, for example <input id="project[task_attributes][]" .../>
is the result of something like <%= fields_for :task %>
nested inside of <%= form_for :project %>
. I'm sure other frameworks do the same.
This means that if you went to a random webpage and you saw that structure, via some regular expression magic, you could convert that html back to its template!
Has anybody ever tried to build anything like that? Do you think it's even possible?
Update:
I myself am only interested in Ruby on Rails applications (not just the form as the above example shows, but everything on the html page), but if it were possible for everything, even better.
Once you generated the template HTML file (the ERB file in Rails), you could them manually go through and figure out the model and controller. You'd have to have the program compare all of the generated ERB files to figure out how to build the model and the controllers which might be an even bigger task. But that would be the end goal