locked
Asp.Net Application Architecture RRS feed

  • Question

  • User-1100884601 posted

    Hi All Experts!!

    I am creating a Ecommerce Applications using Asp.net 4.5  Web form

    I want my business library code should be sharable .i mean i can use it in our Windows phone , IOS, Silverlight App Development. (This will support Multiple Platforms)

    I searched in google and came across Web API   &  Portable Class Libraries.  but i am not  sure which one is best or  should i use both .

    if anyone help me to sort out this problem, how to architect the project. 

    Any online resources will be helpful .

    Thanks

    Udal 

    Thursday, October 24, 2013 2:31 PM

All replies

  • User551462331 posted

    portable class libraries are used to share code among different .net platform projects.... which is different requirement than u r's

    u should use web api which is Restful and can be easily used to get data from any OS/platform

    hope this helps...

    Thursday, October 24, 2013 2:44 PM
  • User-1100884601 posted

    Hi ,

    Thanks for your reply.  

    So if i use Web API .. i can be able to use my business login in  other platfroms .. I dont have write code twice ..right? 

    Thanks

    Udal 

    Thursday, October 24, 2013 2:59 PM
  • User551462331 posted

    Hi ,

    Thanks for your reply.  

    So if i use Web API .. i can be able to use my business login in  other platfroms .. I dont have write code twice ..right? 

    Thanks

    Udal 

    yes... u can write all business logic in web api.... and simply call all get/update type of requests to web api... so, every client like web page, ios, silvelight can call same web api

    hope this helps...

    Thursday, October 24, 2013 4:24 PM
  • User-1100884601 posted

    Can we put WebApiController class in Class Library . If Yes, how can we call that API controller method via web forms code behind?

    Thanks

    Udal

    Friday, October 25, 2013 2:05 AM
  • User-488622176 posted

    you could also use plain WCF functionality. As you are also plannin IOS & Silverlight, including .NET assemblies is not a good idea. Web API and/or WCF can do the trick.

    Friday, October 25, 2013 9:30 AM
  • User2019981500 posted

    Hi,

    Fact is that your architecture/designs demands use of WebApi because  Webapi's is just dependent on Http protocols and can be consumed by any type of device you have mentioned.WebApi allows to create services that can be exposed over HTTP rather than through a formal service such as WCF or SOAP .There are more exciting client platforms available to run your applications than ever before. Whether you are targeting your application at phones, tablets, or browsers virtually every great client application needs a great backend.  . Here you see  http://channel9.msdn.com/Events/Build/2012/3-036how ASP.NET Web API works great for building backend services for your Windows 8 apps and gives you the power and flexibility to build your web APIs your way.

    Rather using Portable Class Libraries It can be hard to figure out what APIs are supported on a given combination of platforms AND not possible to use conditional compilation (#if statements) to get around differences between the different platforms

    Rest is all yours

    regards

    shabir

    Saturday, October 26, 2013 4:30 AM