I have done a windows project in which I have a simple download button which downloads contents from an external web portal. Here I have done with dataaccess class which is used for CRUD operations. Now I need to seperate UI and business logic layer. My UI code looks a bit untidy. So I need to create a BLL. For BLL, can I write the html parsing method (ProcessHtml) and the method which uses httpwebrequest to get html output of webpage(SendHTTPRequest) and the method which uses the html contents to write into a doc file.(WriteToFile). Will it make sense?.Simply
Can I use in BLL the below methods.
BLL
ProcessHtml()
SendHTTPRequest()
WriteToFile()
The boundaries of the layers here are too thin, and it depends on how you would like to code you project.
What I would do, in this case, is introduce some: BridgeLayer, which transforms UI data, to the format suitable for storing/retriving informaiton from some store. In that layer I would push
HtmlAgilityPack.If you’re familiar with
MVVMdesign, in other words it would beModelViewlayer: something that knows how to make talk UI with data, considering that the format of them could be completely different.