Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

C++ : Avoid lot of boolean variable for multiple verification conditions in trading app -


i junior dev in trading app... have order refresh verification unit. has verify order confirmation exchange. send bunch of different request in bulk ( new, modify, cancel ) exchange... verification has happen max n times each t intervals orders. if verification successful order before n retry fine.. otherwise need indicate verification unsuccessfull. hv done basic coding done in urgent below

for( n times ) {    for_each ( sent_request_order )   // sent    {        1)  refreshed order db or shared mem i.e refreshed        2) find current sent order in refreshed          if( not_found )             not refreshed exchange, continue next order         if( found )         case new :    //check new status, mark verification done        case modify : //check modified status..                       //if not mark pending, go next order,                       //revisit same after t time        case cancel : //check cancelled status..                       //if not mark pending, go next order,                       //revisit same after t time    }     if( all_verified )        exit verification.     wait ( t sec )  } 

order_verification_pending, order_verification_done, order_visited, order_not_visited, all_verified, all_not_verified ... lot of boolean flags used indication..

is there better approach doing this.... splitting responsibilities across classes......????

i know not general question.... still flags making me tidious handle...

your algorithm looks workable. implement it.

do not try optimize code before got working. once have working version running, nevermind how ugly, then @ ways & means optimize. chances find way handle flags gives trouble.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -