CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 finding modified .asp pages (not the *_event.asp pages)

Print topic Send  topic

Author Message
rbaldwin

Posts: 172
Posted: 12/12/2005, 1:39 PM

i've been using ccs for about 5 years.

I have one very large project that i just converted to 3.0

I know that i have a few pages where i've gone into the generated .asp page and made some modifications.

I know that if i view the code i can tell where my modifications are because the background will be white.

I have about 300 pages in my project.

I'd like to be able to identifiy the pages that i've made changes to by some method other than viewing a white background. It would be nice if CCS flagged such pages but it doesn't.

Does anyone have a suggestion for finding such pages? And yes in hind sight i should have put some standard comment in the pages so that i could grep through the files.
View profile  Send private message
mrachow


Posts: 509
Posted: 12/13/2005, 7:36 AM

A while ago I had asked Yes for their algorithm used to compute the checksum of code blocks (classes, functions, methods aso).
Having this one would be able to prove existing code and make own code "unwhite".
I was not able to understand what they tried me to explain. Only thing I got was that it is not as easy as calling a single function.
_________________
Best regards,
Michael
View profile  Send private message
rbaldwin

Posts: 172
Posted: 12/13/2005, 7:39 AM

I'd be happy if at the top of the code it simply said "Modified".

i'd be really pleased if the page icon in the project explorer was a different color.

I'd even be ok with a list of modified pages.
View profile  Send private message
peterr


Posts: 5971
Posted: 12/13/2005, 12:19 PM

A quick suggestion to consider:
1. Create a backup of your CCS project.
2. Generate the application into a temporary folder.
3. Delete all Page.php files from your project (except _events.php)
4. Generate the application into another temporary folder.
5. Find some Windows utility that will compare the files content in both temporary folders. I suspect that there are such generic tools for Windows, although I cannot recommend any specific one.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Walter Kempees
Posted: 12/13/2005, 1:07 PM

Good compare tool, freeware
WinMerge http://winmerge.org/ GNU licence

"peterr" <peterr@forum.codecharge> schreef in bericht
news:2439f2cea000ea@news.codecharge.com...
>A quick suggestion to consider:
> 1. Create a backup of your CCS project.
> 2. Generate the application into a temporary folder.
> 3. Delete all Page.php files from your project (except _events.php)
> 4. Generate the application into another temporary folder.
> 5. Find some Windows utility that will compare the file content in both
> temporary folders. I suspect that there are such generic tools for
> Windows,
> although I cannot recommend any specific one.
> _________________
> Peter R.
> YesSoftware Forums Moderator
> For product support please visit http://support.yessoftware.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Walter Kempees
Posted: 12/13/2005, 1:14 PM

He's doing ASP, assume procedure is the same?

Good compare tool, freeware
WinMerge http://winmerge.org/ GNU licence

"peterr" <peterr@forum.codecharge> schreef in bericht
news:2439f2cea000ea@news.codecharge.com...
>A quick suggestion to consider:
> 1. Create a backup of your CCS project.
> 2. Generate the application into a temporary folder.
> 3. Delete all Page.php files from your project (except _events.php)
> 4. Generate the application into another temporary folder.
> 5. Find some Windows utility that will compare the file content in both
> temporary folders. I suspect that there are such generic tools for
> Windows,
> although I cannot recommend any specific one.
> _________________
> Peter R.
> YesSoftware Forums Moderator
> For product support please visit http://support.yessoftware.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

rbaldwin

Posts: 172
Posted: 12/13/2005, 1:17 PM

thanks. Peterr & Walter i'll give it a try.

That will probably work, but an integrated CCS solution would be nice.

View profile  Send private message
rbaldwin

Posts: 172
Posted: 12/13/2005, 1:23 PM

OH, and what about the code generated by major versions of CCS, can i expect that the code would be the same between 2.3 and 3.0? if not then would this be a useful process?
View profile  Send private message
peterr


Posts: 5971
Posted: 12/13/2005, 1:32 PM

All the above steps should be done after upgrading the project to version 3.0. Thus both temporary folders should contain code generated by CCS 3.0.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Adrian Green
Posted: 12/15/2005, 5:21 PM

I had almost exactly the same requirement some time ago. I've just been
looking for the script I created, but can't find it (yet).

The solution for me was to use Regular Expressions to :
Parse all ASP pages, and look for code blocks.
Look for the Identifier comments that surround the blocks ( eg: starts with
'MethodName Method @1-40984FC5 
and ends with
'End   
MethodName
)
Extract code that exists between indentifier comments, and remove all
whitespace.
Calculate CRC32 on the code. (The CRC32 is the last 8 hex chars in the
identifier comment.) and compare with the CRC in comment. If they do not
match then you've edited the code by hand. This seems to be one of the ways
that CCS detects custom code and generated code, and changes background
colour etc.

The same CRC32 check is also used on Page Variables and other things.

Note that when the Identifier comment is on the same line as an item of code
( as in Class definitions eg:
 Class Foo '@1-C1098FB7
, then
the CRC32 is of the code on the line preceding it. ie: in this case, the
class signature.

Hope this helps a little bit. It was useful to me when trying to nut out why
my application would not generate properly. I don't "hand edit" generated
code now - learned that lesson, but knowing how it works under the hood is
useful.

Adrian.

"mrachow" <mrachow@forum.codecharge> wrote in message
news:2439eea6286549@news.codecharge.com...
>A while ago I had asked Yes for their algorithm used to compute the
>checksum of
> code blocks (classes, functions, methods aso).
> Having this one would be able to prove existing code and make own code
> "unwhite".
> I was not able to understand what they tried me to explain. Only thing I
> got
> was that it is not as easy as calling a single function.
> _________________
> Regards,
> Michael
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

mrachow


Posts: 509
Posted: 12/16/2005, 12:01 AM

Thanks Adrian,

I supppose this will help (me) more than a little bit.
_________________
Best regards,
Michael
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.