locked
Help needed urgently for coding in vb.net please... RRS feed

  • Question

  • User-1207879329 posted

    Hi friends,

    Using VB.NET, i have to develop a plugin which must analyse a web interface and point out what is wrong. For example, if textboxes in a home page are not well-aligned, the plugin must detect this and align the textboxes correctly. I guess some codes about how to edit the source code of web pages are needed and how to detect the positions of textboxes also. This is the simplest task which the plugin must do.

    Please help me.

    Thanks a lot.

    Tuesday, December 14, 2010 7:46 AM

Answers

  • User-1199946673 posted

    Rather, i'l have to develop an application program which will perform these tasks
     

    In that case, you question runs out of the scope ot these forums, because they are intended for ASP.NET related questions only. Beside that, on forums like this you need to ask specific questions on problems that you face. maybe you should read this:

    http://www.mikesdotnetting.com/Article/124

    If you want the read the source of a webpage, search on google/binq for screen scraping, you can use regular expressions to search for patterns, and also note that styling of most websites is done with CSS. But like I said, first try things for yourself, if you encounter a specific problem ask a question on a appropriate forum....

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 17, 2010 4:20 AM
  • User-952121411 posted

    To add on again as I have eluded to multiple times, this could potentially be a massive project trying to account for all of the logic to read and process someones code. You can't state "How do I do it all from Step #1, and please give me the code". You must begin the project yourself and then come back to the forums with specefic issues. It is difficult to answer broad questions such as the one by the OP. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 20, 2010 2:26 PM

All replies

  • User-957431521 posted

    hi

    what you need is named "coded UI test" and it is a test project. see :

    http://msdn.microsoft.com/en-us/library/dd286681.aspx

    http://msdn.microsoft.com/en-us/library/dd286726.aspx

    please read the above tutorials very carefully and if they didn't help, let me know. 

    Tuesday, December 14, 2010 10:24 AM
  • User-1207879329 posted

    Thanks for the help....I'm going to read the tutorials but can i use visual studio 2008 for this project?

    Tuesday, December 14, 2010 1:23 PM
  • User-952121411 posted

    i have to develop a plugin which must analyse a web interface and point out what is wrong. For example, if textboxes in a home page are not well-aligned, the plugin must detect this and align the textboxes correctly.
     

    The last (2) MSDN links are really not a solution to how you are describing what you are requiring. They are more for doing UI testing to ensure it behaves properly (code, data, etc), but gives you no feedback as to how the physical site is laid out and if it is done properly.

    The problem with what you are asking to do is that it is 100% subjective.  Textboxes that are not lined up correctly are in no way 'wrong' by any means.  It is not an error, or an issue; just a subjective opinion that they should be all lined up makes them 'proper'. This is going to be difficult to do as the parameters to decide what is 'correct' vs 'incorrect' in a subjective manner and setting up those parameters will be challenging.

    I think the way that this type of check is traditionally done is via a physical look or code review from a peer or senior member of your team. They are the ones that can usually point out, "Oh that looks terrible, and those text boxes need to be aligned...". Technically the site could be working 100% (again why the last links are not applicable here), but the look is totally subjective. Coding guidelines can sometimes prevent these problems from the beginning if you can make a tangible rule on how to make your physical design look.

    Tuesday, December 14, 2010 2:09 PM
  • User-1207879329 posted

    Yes i understand that this type of check must be done via physical look, in fact in my background study cocerning this topic, i have already mentioned that this type of check is done via physical look. But the final year project that i have got must perform the tasks that till now HCI experts are doing. I have done maximum research concerning HCI guidelines. The following are basically what my plugin must do:    

    • users shall be able to install the plugin.
    • The system shall check the font sizes of the different texts found on the screen and do corrections in case they are wrong. According to my research, it must be 12-14 points for body text and 18-36 points for titles and headings.
    • The system shall be able to align the control items present on the screen appropriately.
    • The system shall adjust the sizes of the buttons and textboxes present on the screen so that they are of the same height and width.
    • The system shall inform users in case the number of control items and different colors which are present on a screen have exceeded the maximum number.
    • The system shall group the radio buttons and check boxes with borders.
    • The system shall mask the characters in case of passwords being input in textboxes.
    • The system shall propose appropriate colors which can be used for particular application.
    • The user shall be able to uninstall the plugin.


    Wednesday, December 15, 2010 7:24 AM
  • User-952121411 posted

    I have never seen a tool that does this type of thing, but that does not mean it doesn't exist.  I would think that you would need to create a VS.NET add-in that somehow looks at all the properties in the guidelines you set forth and then give feedback or does the actual manipulation in VS.NET.  I know the VS.NET 2010 interface was built mostly using WPF so there might be some opportunity using that and the actual studio interface to modify the developers UI design. However, like I mentioned I have not seen anything like this before, and I believe making it from scratch could be a ton of work. 

    If all else fails, a good old fashion check list with your guidelines / requirements (it is good that you have some to being with!) might have to be the backup.

    Wednesday, December 15, 2010 3:07 PM
  • User-957431521 posted

    I would think that you would need to create a VS.NET add-in that somehow looks at all the properties in the guidelines you set forth and then give feedback or does the actual manipulation in VS.NET. 

     

    yes, i didn't notice that what he needs is a physical look of textboxes...

    in this case you have two options :

    senior team member or VS add-in.

    Thursday, December 16, 2010 4:03 AM
  • User-1207879329 posted

    Actually friends, my supervisor has accepted that its not necessary that i develop a plugin because its complicated to do so. Rather, i'l have to develop an application program which will perform these tasks. At first, an interface will appear in which users will have to input the URL of the web page which must be evaluated. Then according to the URL entered, the program will have to read and edit the web page's source code. Can you help me for this please? When the URL is entered, how to read and edit its source code?

    Thursday, December 16, 2010 12:53 PM
  • User-952121411 posted

    When the URL is entered, how to read and edit its source code?
     

    Well this question is essentially the same question from your 1st post that we have already walked through. As I mentioned previously, I have not seen any tool do this kind of 'subjective' manipulation to an applications source. Even with the guidelines you set forth it is still going to be quite a task to write something that can interact with VS.NET to actually read and manipulate (change) the source code to be compliant with your guidelines. So the bottom line: I don't know an answer because I have never seen anything like that done before.

    Your next best bet using software would be to use a product like Team Foundation Server and things like "Gated Check-ins" of code.  This allows leads, senior team developers, etc. to review code before it is allowed to be a part of source control.  In your instance if the criteria you set forth is not met, you could reject the check in with comments and send it back to the developer. It is not an automation of checking code, but the workflow aspect of the process would be built into TFS.

    Thursday, December 16, 2010 2:20 PM
  • User-957431521 posted

    how is that possible ??

    what kind of supervisor is that doesn't know the web pages source code is not editable after they are compiled ?

    but if he meant the generated html source code that's another story however you can read it or manipulate and even save a copy but it doesn't effect the actual source code and it's just an output html.

    Thursday, December 16, 2010 2:26 PM
  • User-1207879329 posted

    Yes it is actually what i meant...the generated html source code. I need the codes which will  read and allow to edit the generated html source code when the URL is input in the interface.


    Thursday, December 16, 2010 2:43 PM
  • User-952121411 posted

    I need the codes which will  read and allow to edit the generated html source code when the URL is input in the interface.
     

    Did you read my post at all? I highly doubt anyone is going to have the code to copy and paste here that will do what you want to manipulate VS.NET and someones source code based on your guidelines.  I really think you are going to have to go another way about accomplishing your task. If you could do it, it would probably be some low level WPF coding to interact directly with VS.NET, or some other parsing engine that reads the source files like text and then determines if the code is up to standards. And even if that code exists, it wouldn't fit into a post here on these forums.

    Thursday, December 16, 2010 2:50 PM
  • User-957431521 posted

    so what do you want to do after reading or manipulating that source ?

    you want to save it on disk, want to send it somewhere (url or IP maybe?) 

    please be specific on this.

    Thursday, December 16, 2010 2:58 PM
  • User-1207879329 posted

    while reading the page's html code, it will be possible to check for example how many radio buttons tags there are in the html codes and if it exceeds the maximum number then alert users about it. That's why its important to read the html code, the checking which needs to be done can be carried out while reading it.

    Friday, December 17, 2010 4:02 AM
  • User-1199946673 posted

    Rather, i'l have to develop an application program which will perform these tasks
     

    In that case, you question runs out of the scope ot these forums, because they are intended for ASP.NET related questions only. Beside that, on forums like this you need to ask specific questions on problems that you face. maybe you should read this:

    http://www.mikesdotnetting.com/Article/124

    If you want the read the source of a webpage, search on google/binq for screen scraping, you can use regular expressions to search for patterns, and also note that styling of most websites is done with CSS. But like I said, first try things for yourself, if you encounter a specific problem ask a question on a appropriate forum....

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 17, 2010 4:20 AM
  • User-957431521 posted

    In that case, you question runs out of the scope ot these forums, because they are intended for ASP.NET related questions only. Beside that, on forums like this you need to ask specific questions on problems that you face.

     

    yes i agree with hans, it's not that simple to be able to post its code in here, beside finding a radio button is different then finding a textbox(for example) and because of that it will take more code then what you expect.

    Friday, December 17, 2010 2:45 PM
  • User-952121411 posted

    To add on again as I have eluded to multiple times, this could potentially be a massive project trying to account for all of the logic to read and process someones code. You can't state "How do I do it all from Step #1, and please give me the code". You must begin the project yourself and then come back to the forums with specefic issues. It is difficult to answer broad questions such as the one by the OP. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 20, 2010 2:26 PM