Best practice for development using REST API - OData

Hi All, I am new to REST. I am a developer who works mostly in server-side code using Visual Studio. Now that Microsoft is advocating to write code using REST API instead of server-side code or client side object model, I am trying to use REST API.
I googled and most of the example shows to write a code and put it on Content Editor/Script Editor. How to organize code and deploy to the staging/production in this scenario? Is there any Best Practice or example around this?
Regards,
Khushi

If you are writing code in aspx or cs it does not mean that you need to deploy it in the SharePoint server, it could be any other application running from your remote server. What I mean it you can use C# & Rest API to connect to SharePoint server.
REST API in SharePoint 2013 provides the developers with a simple standardized method of retrieving information from SharePoint and it can be used from any technology that is capable of sending standard HTTP requests.
Refer to the following blog that provide your more details about comparison of the major features of these programming choices/
http://msdn.microsoft.com/en-us/library/jj164060.aspx#RESTODataA
http://dlr2008.wordpress.com/2013/10/31/sharepoint-2013-rest-api-the-c-connection-part-1-using-system-net-http-httpclient/
Hope this helps
--Cheers

Similar Messages

  • Best practices for development / production environments

    Our current scenario:
    We have one production database server containing the APEX development install, plus all production data.
    We have one development server that is cloned nightly (via RMAN duplicate) from production. It therefore also contains a full APEX development environment, and all our production data, albeit 1 day old.
    Our desired scenario:
    We want to convert the production database to a runtime only environment.
    We want to be able to develop in the test environment, but since this is an RMAN duplicated database, every night the runtime APEX will overlay it, and the production versions of the apps will overlay. However, we still want to have up to date data against which to develop.
    Questions: What is best practice for this sort of thing? We've considered a couple options:
    1.) Find a way to clone the database (RMAN or something else), that will leave the existing APEX environment intact? If such is doable, we can modify our nightly refresh procedure to refresh the data, but not APEX.
    2.) Move apex (in both prod and dev environments) to a separate database containing only APEX, and use DBLINKS to point to the data in both cases. The nightly refresh would only refresh the data and the APEX database would be unaffected. This would require rewriting all apps to use DBLINKS though, as well as requiring a change to the code when moving to production (i.e. modify the DBLINK to the production value)
    3.) Require the developers to export their apps when done for the day, and reimport the following morning. This would leave the RMAN duplication process unchanged, and would add a manual step which the developers loath.
    We basically have two mutually exclusive requirements - refresh the database nightly for the sake of fresh data, but don't refresh the database ever for the sake of the APEX environment.
    Again, any suggestions on best practices would be helpful.
    Thanks,
    Bill Johnson

    Bill,
    To clarify, you do have the ability to export/import, happily, at the application level. The issue is that if you have an application that consist of more than a couple of pages, you will find yourself in a situation where changes to page 3 are tested and ready but, changes to pages 2, 5 and 6 are still in various stages of development. You will need to get the change for page 5 in to resolve a critical production issue. How do you do this without sending pages 2, 5 and 6 in their current state if you have to move the application all at once??? The issue is that you absolutely are going to need to version control at the page level, not at the application level.
    Moreover, the only supported way of exporting items is via the GUI. While practically everyone doing serious APEX development has gone on to either PL/SQL or Utility hacks, Oracle still will not release a supported method for doing this. I have no idea why this would be...maybe one of the developers would care to comment on the matter. Obviously, if you want to automate, you will have to accept this caveat.
    As to which version of the backend source control tool you use, the short answer is that it really doesn't matter. As far as the VC system is concerned, you APEX exports are simply files. Some versioning systems allow promotion of code through various SDLC stages. I am not sure about GIT in particular but, if it doesn't support this directly, you could always mimic the behavior with multiple repositories. Taht is, create a development repository into which you automatically update via exports every night. Whenever particular changes are promoted to production, you can at that time export form the development repository and into the production. You could, of course, create as many of these "stops" as necessary to mirror your shop's SDLC stages, e.g. dev, qa, intergation, staging, production etc.
    -Joe
    Edited by: Joe Upshaw on Feb 5, 2013 10:31 AM

  • Best practice for developing with CRM 2013 (On Premises)

    Hello all.  I'm just starting to work with CRM, and I have some questions that hopefully will be simple for the seasoned developers.  It's mostly just some best practice or general how-to questions for the group.
    - When creating a new Visual Studio CRM Project I can connect to my CRM Instance and create new WebResources which deploy to the CRM instance just fine, but how can I pull all the existing items that are in the CRM Solution into the Visual Studio CRM project?
     Or do I need to export the solution to a ZIP, expand it with SolutionPackager.exe, then copy these into my Visual Studio project to get it into sync?
    - When multiple developers are working on changes is it best to keep everything in a Visual Studio project as I mentioned above, or is it better for everyone to have their own instance of CRM to code with so they can Export/Import solutions as needed then
    these solutions be manually merged before moving into a common Test/QA environment?
    - When modifying the submenu on a CRM form is it suggested to use Ribbon Workbench or is it better/easier to just export the solution, expand it with SolutionPackager.exe,  modify ribbondiff and anything else required for the change, package it
    back up, then reimport to CRM?  I've heard from some that Ribbon Workbench has some limitations, but being green I wasn't sure what those limitations might be or if it'd be best to just manually make these changes.  Or is thre any way to have a copy
    of ribbondiff in Visual Studio and deploy this without having to repackage the Solution and Import in the ZIP?
    I think that's it for now :)  Thanks for any advise or suggestions.  I really want to start learning the in's and out's of CRM and how all the pieces fit together.  Also can someone direct me to some documentation or books that might give
    more insight on developing for CRM 2013 or 2015 (moving to this soon)?
    Thanks for your time.

    Hi Sam
    Also interested in best practice around this area - especially recommended development routes, unit testing, continuous integration etc - it would be great if you posted here if you find any good articles etc. At the moment we tend to just push changes
    onto a live system as and when appropriate and I'd prefer to move away from that...
    Thanks
    Stuart

  • Any Best Practices for developing custom ABAP reports for Portal?

    Hello,
    The developers on our project are debating the best way to develop custom reports and make them available on the portal.  Of these options that we can think of, can you give any pros & cons, or experiences, or other options?
    - Web-enabled Abap report programs
    - WebDynpro for Abap
    - WebDynpro for Abap using ALV
    - Adobe forms
    Does a "Best Practices" document or blog exist on this topic?
    Thanks,
    Colleen

    Re: Using p_trace=YES

  • Best Practice for CTS_Project use in a Non-ChARM ECC6.0 System

    We are on ECC6.0 and do not leverage Solution Manager to any extent.  Over the years we have performed multiple technical upgrades but in many ways we are running our ECC6.0 solution using the same tools and approaches as we did back in R/3 3.1. 
    The future vision for us is to utilize CHARM to manage our ITIL-centric change process but we have to walk before we can run and are not yet ready to make that leap.  Currently we are just beginning to leverage CTS_Projects in ECC as a grouping tool for transports but are still heavily tied to Excel-based "implementation plans".  We would appreciate references or advice on best practices to follow with respect to the creation and use of the CTS_Projects in ECC.
    Some specific questions: 
    #1 Is there merit in creating new CTS Projects for support activities each year?  For example, we classify our support system changes as "Normal", "Emergency", and "Standard".  These correspond to changes deployed on a periodic schedule, priority one changes deployed as soon as they are ready, and changes that are deemed to be "pre-approved" as they are low risk. Is there a benefit to create a new CTS_Project each year e.g. "2012 Emergencies", "2013 Emergencies" etc. or should we just create a CTS_Project "Emergencies" which stays open forever and then use the export time stamp as a selection criteria when we want to see what was moved in which year?
    #2 We experienced significant system performance issues on export when we left the project intersections check on.  There are many OSS notes about performance of this tool but in the end we opted to turn off this check.  Does anyone use this functionality?  Any reocmmendations?
    Any other advice would be greatly appreciated.

    Hi,
    I created a project (JDeveloper) with local xsd-files and tried to delete and recreate them in the structure pane with references to a version on the application server. After reopening the project I deployed it successfully to the bpel server. The process is working fine, but in the structure pane there is no information about any of the xsds anymore and the payload in the variables there is an exception (problem building schema).
    How does bpel know where to look for the xsd-files and how does the mapping still work?
    This cannot be the way to do it correctly. Do I have a chance to rework an existing project or do I have to rebuild it from scratch in order to have all the references right?
    Thanks for any clue.
    Bette

  • What is the best practice for developing web service?

    Hi All,
    I'm a newbee to web services...
    I was wondering what would be the best approach in developing a web service,
    using tools or programmatic approach?
    If I use WebLogic Workshop, am I tied to a vendor?
    Is it possible for me to develop web services using workshop and deploy in
    another app server..?
    I would appreciate if somebody could give me a pointer to start.
    I have already referred BEA's docs.
    I'm still confused on a good starting point on the best approach to develop
    protable web services.
    Thanks in advance for any inputs.
    K K

    K K-
    You have a very valid point on the simplify or complicate matters. If you are
    going for clean and not-so-time-centric code, then there are several different
    programs and packages out there you can choose from.
    Since you are specialized in J2EE, than the Sun package may be what you are looking
    for. BEA's classes simplify much of the work you will be doing, but you could
    emulate their classes or extend yours above the functions provided in theirs.
    It all boils down to how much work are you willing to do.
    If you are asking for more detailed, coding 'Design Patterns' to utilize, I would
    wait for a few more posts from other folks as my work often requires me to utilize
    the tools provided.
    Sincerely,
    Eric Ballou
    "K K" <[email protected]> wrote:
    Eric,
    Thanks for the response.
    I was also looking at Sun's WSDP 1.1, which is more programmatic approach.
    Some how, I feel being a J2EE developer, I should go on the direction
    of the
    programmatic approach.
    Using the tools could simplify or complicate things. Also, the Workshop
    samples import all weblogic specific packages.
    My code looks so dirty with many vendor specific packages being imported.
    Could you give me your suggestions for a clean and neat approach?
    I would personally prefer to avoid the quick and dirty approach.
    Thanks again.
    "Eric Ballou" <[email protected]> wrote in message
    news:[email protected]...
    K K-
    The best approach in developing portable web services is knowing whatyou
    are
    planning on using them for as well as how much is willing to be spent,etc.
    BEA's Workshop is portable to other frameworks, but the ease ofintegrating a
    developed client or a developed server can very greatly. Even moreof an
    issue
    is migration from one framework to another. If you choose to developin
    Workshop
    and your company later deploys .Net solutions, some of your work mayhave
    to be
    redone unless the company is willing to keep portions of the 'old'system
    around
    until new versions of the service are available. However, Workshophas
    several
    ant tools available that would assist you in deploying to other appservers or
    even a stand-alone application should you need cross framework abilities.
    If you are just starting out in web services, http://www.webservices.org
    is a
    good place to start checking out vendors in the space.
    Sincerely,
    Eric Ballou
    "K K" <[email protected]> wrote:
    Hi All,
    I'm a newbee to web services...
    I was wondering what would be the best approach in developing a web
    service,
    using tools or programmatic approach?
    If I use WebLogic Workshop, am I tied to a vendor?
    Is it possible for me to develop web services using workshop and deploy
    in
    another app server..?
    I would appreciate if somebody could give me a pointer to start.
    I have already referred BEA's docs.
    I'm still confused on a good starting point on the best approach todevelop
    protable web services.
    Thanks in advance for any inputs.
    K K

  • Best practice for the use of reserved words

    Hi,
    What is the best practice to observe for using reserved words as column names.
    For example if I insisted on using the word comment for a column name by doing the following:
    CREATE TABLE ...
    "COMMENT" VARCHAR2(4000),
    What impact down the track could I expect and what problems should I be aware of when doing something like this?
    Thank You
    Ben

    Hi, Ben,
    Benton wrote:
    Hi,
    What is the best practice to observe for using reserved words as column names.Sybrand is right (as usual): the best practice is not to use them
    For example if I insisted on using the word comment for a column name by doing the following:
    CREATE TABLE ...
    "COMMENT" VARCHAR2(4000),
    What impact down the track could I expect and what problems should I be aware of when doing something like this?Using reserved words as identifiers is asking for trouble. You can expect to get what you ask for.
    Whatever benefits you may get from naming the column COMMENT rather than, say, CMNT or EMP_COMMENT (if the table is called EMP) will be insignificant compared to the extra debugging you will certainly need.

  • Best practice for ConcurrentHashMap use?

    Hi All, would the following be considered "best practice", or is there a better way of doing the same thing? The requirement is to have a single unique "Handler" object for each Key:
    public class HandlerManager {
        private Object lock = new Object();
        private Map<Key,Handler> map = new ConcurrentHashMap<Key,Handler>();
        public Handler getHandler(Key key) {
            Handler handler = map.get(key);
            if (handler == null) {
                synchronized(lock) {
                    handler = map.get(key);
                    if (handler == null) {
                        handler = new Handler();
                        map.put(key, handler);
            return handler;
    }Clearly this is the old "double-checked-locking" pattern which didn't work until 1.5 and now only works with volatiles. I believe I will get away with it because I'm using a ConcurrentHashMap.
    Any opinions? is there a better pattern?
    Thanks,
    Huw

    My personal choice would be to use the reliable "single-checked-locking" pattern:
        public Handler getHandler(Key key) {
            synchronized(lock) {
                Handler handler = map.get(key);
                if (handler == null) {
                    handler = new Handler();
                    map.put(key, handler);
                return handler;
        }But I'm afraid the Politically Correct way of doing it nowadays looks as ugly as this:
    class HandlerManager {
        private Map<Key,Handler> map = new HashMap<Key,Handler>();
        private final Lock readLock;
        private final Lock writeLock;
        public HandlerManager() {
            ReadWriteLock lock = new ReentrantReadWriteLock();
            readLock = lock.readLock();
            writeLock = lock.writeLock();
        public Handler getHandler(Key key) {
            Handler handler = null;
            readLock.lock();
            try {
                handler = map.get(key);
            } finally {
                readLock.unlock();
            if (handler == null) {
                writeLock.lock();
                try {
                    handler = map.get(key);
                    if (handler == null) {
                        handler = new Handler();
                        map.put(key, handler);
                finally {
                    writeLock.unlock();
            return handler;
    }

  • SqlCeConnection in CE 4.0: best practices for desktop use?

    I am using SQL Server CE 4.0 in a WinForms desktop application and was wondering what are the recommended practices for using SqlCeConnection in this context. I noticed some older threads on the topic however some of them talk mostly about mobile or are
    from a long time ago
    1. Should a new SqlCeConnection be created every time the DB is accessed or is it better to have on SqlCeConnection open and shared through the entire application?  My application can make frequent writes to the DB and when this happens I notice a noticeable
    UI lag if a new SqlCeConnection is created for which DB access.
    2. Can SqlCeConnection instances be shared across threads? On occasion my application performs DB reads in a background thread. Can I use the same SqlCeConnection instance from different threads?
    3. Are there any additional steps needed to ensure multi-thread safety when multiple threads can access the DB simultaneously when SQL Server CE is deployed in embedded mode? When I create a new SqlCeConnection for each DB access I ran into a few crashes
    and Monitor exceptions, possibly when multiple threads are accessing the same database.
    I am using SQL Server CE 4.0 embedded in a WinForms 2.0 Windows desktop application (non-mobile).  Any advice would be appreciated.

    You must use seperate SqlCeConnection etc object per thread, as these objects are not thread safe.
    I recommend opening the database on the main thread, and keep this connection unused and open for the lifetime of the app to keep the database file and engine "warm".
    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

  • Best practice for developing multi language Website

    Hi all
    I want to develop my website in multiple languages and I know that I can put all the msg string in the resource bundle or in the database, however, I think this makes the interface of the web becomes very difficult to develop because I can't see anything in the HTML editor. Another solution is to use XSL that I believe HTML editors is able to display the tagname or some description of the XSL tag but I am not sure about that because I haven't used it before.
    Have any expert web developers find a better solution or do you guys think XSL is the best solutions? Any suggestions are very welcome. Thank You!
    From
    Edmond

    being not familiar with xsl, I say go for resources. If you define your own tag to display text, it isnt that hard to understand, e.g.
    <translate id="hello.world"/>. That at least is how I make multi language website.

  • Best practice for developing and testing AIR iOS multitouch apps

    I'm considering switching our iPhone development practice from XCode/Objective C to AIR to leverage a larger pool of in house talent. The biggest concern I have right now is testing multitouch functionality - the prospect of having to do incremental builds, provisioning and deployment just to test and tweak the multitouch aspects of our projects is daunting, if not downright depressing.
    What tools / services or techniques have been developed to facilitate what is undoubtedly one of the most common issues with developing for multitouch iOS using a desktop-based AIR development environment?

    @tomaugerdotcom
    Something like this might help: https://testflightapp.com/
    Concevably, you could roll your own internal service if that particular one doesn't suit you. (I don't have any knowledge about how they are doing it, but it shouldn't be hard to figure out since Apple's constraining rules would only allow a few possibilities.)
    USB app install and debugging isn't supported on iOS. You have to use wireless.
    Another option specifically for multi-touch dev/testing, is to use an Android device.

  • Best Practice for Developer update access to database in Production

    I am curious to find out what other organizations are doing as to developer access to sysadm in production. Such as using a database account created like sysadm that can be checked out for use and locked when not in use? or ?

    Developer can be provided with Read only access to SYSADM schema.
    Thanks
    Soundappan
    Edited by: Soundappan on Dec 26, 2011 12:00 PM

  • Firewall what is best practice for home use?

    Hi (from France) and thanks in advance.
    I want to activate firewall but don't know which setting to choose for the right mix of security/ease of use. My Imac connected by ethernet to Dartybox (router) and sharing internet access with my wife's Macbook pro via wifi .

    simonfromfra wrote:
    The 'dartybox' router has a very poor security rating - so my reading tells me, and is the easiest of all French internet  "out of the box all in one" connections to hjack (crack codes well documented)... hence my desire for second layer protection.
    Take a look at: IceFloor
    IceFloor is not a firewall. Your Mac already features three built-in firewalls:
    • ALF
    • PF
    • IPFW
    ALF is an application firewall, while both PF and IPFW are network firewalls.
    ALF can be configured using System Preferences “Security” pane.
    PF and IPFW do not have a default graphic interface shipped with OS X, so they can be configured only using the shell terminal. Using the terminal is the favourite choice by most system administrators.
    Since Mac OS X 10.7 IPFW has been deprecated. PF is the new default OS X network firewall. To configure PF without using the shell terminal we must use a graphic interface (frontend) from third party software makers.
    IceFloor is a graphic frontend for PF.
    It features a lot of advanced tools and options that will let you set up a very complex PF ruleset.
    IceFloor needs OS X 10.7 or newer.
    Bandwidth management with PF/Dummynet is supported on OS X 10.8 and newer.
    PF ruleset created with IceFloor 2.0 has been tested on:
    OS X 10.7 OS X 10.8 OS X 10.9 iOS 5
    iOS 6 FreeBSD 9 OpenBSD 4.3
    We developed also a limited version of IceFloor named PFLists.
    PFLists is a free and open source basic PF frontend with the same requirements as IceFloor 2.

  • Best practice for Development - any advice?

    We are fairly new to WebLogic/Java development. We are using 6.1. We are coding
    an application, which uses EJBs, JSPs, etc following the M-V-C
    model. We have about 10 developers working on various bits of
    the system. Some have WebLogic/Visual Cafe installed on PCs and
    can work happily without affecting anyone else. Others who do
    not (yet) have powerful-enough PCs to run all this are trying
    to develop and deploy their code on the unix box (HP_UX).
    To enable each developer to work independantly, we have set up
    a new domain for each developer. The idea for this is so that
    each developer can re-deploy his .ear file in his own domain
    without affecting others. We seem to be having lots of problems
    with the consoles seeming to get confused and blowing up with
    memory errors and all sorts of nasty things.
    Is anyone else using a similar way of working?
    Is what we are doing stupid?
    Is there a better way of achieving the separation of developers?
    Any advice/thoughts would be gratefully received.

    We have several developers - each has their own development domain on the
    same server, but we're not experiencing console problems as you described.
    Are you sure they have their own domain instance of WLS?
    This development environment works very well for us. Like you indicated,
    each developer can deploy/redeploy without affecting others.
    Hope this helps...
    Rob
    "Paul Evans" <[email protected]> wrote in message
    news:3be191fd$[email protected]..
    >
    We are fairly new to WebLogic/Java development. We are using 6.1. We arecoding
    an application, which uses EJBs, JSPs, etc following the M-V-C
    model. We have about 10 developers working on various bits of
    the system. Some have WebLogic/Visual Cafe installed on PCs and
    can work happily without affecting anyone else. Others who do
    not (yet) have powerful-enough PCs to run all this are trying
    to develop and deploy their code on the unix box (HP_UX).
    To enable each developer to work independantly, we have set up
    a new domain for each developer. The idea for this is so that
    each developer can re-deploy his .ear file in his own domain
    without affecting others. We seem to be having lots of problems
    with the consoles seeming to get confused and blowing up with
    memory errors and all sorts of nasty things.
    Is anyone else using a similar way of working?
    Is what we are doing stupid?
    Is there a better way of achieving the separation of developers?
    Any advice/thoughts would be gratefully received.

  • Best Practices for dashboards using Query Browser

    Hi,
    As aligned with business requirement, dashboards are using Query browser to fetch data from universes built on SSAS cubes. The issue here is it takes around a minute to initially load the dashboard which is very long as per requirement. Can I find any document or basic points to be taken care of, on improving performance for these dashboards.There are around 30 Queries being used.(cant integrate the queries to decrease the number). Also , using ranking logics at excel level, does this affect the performance?? (All vlookups and "should not be used" formulaes have been omitted)
    Thanks in advance.

    Hi Aarti,
    Check the thread http://scn.sap.com/thread/3482541.
    Any functions used in Excel level like ranking,vlookp etc affects the performance.
    Also check the components you have used in Dashboard as some of them affects the performance.
    Regards,
    JC

Maybe you are looking for

  • I use keynote 5.1 and am bombarded with popups asking me to update to KN 6.  I tried 6 after upgrading to Maverick. Do not like it.

    I use keynote 5.1 and love it.  I tried Keynote 6 and do not like it. My problem is that I am bombarded by popups asking me to update to Keynote 6 This reduce my work speed to a snails pace. Would be most delighted to find a solution to the problem.

  • Automatic PR generation Problem for a material..???

    hiii Experts Can  anybody give some your suggestion and idea trouble shoot this problem by your valuable knowledge and by ur exeperience.. Here my problem. For one material ( ROH ), every month automatically around 20 to 25 PR's are generating . How

  • Help with jar files and running them

    I have been trying to figure out how to run executable java files, now I have heard that a million and one people have asked this already. Though when I see the answer to these questions I am still quite confused, I would like to understand some thin

  • Can't add second PC to Airport Extreme

    I am trying to add a second PC to an existing network of one PC and an Airport Extreme. The new PC found the network and displays a solid signal. However, it then tells me I have "limited or no connectivity" and that the "network did not assign a net

  • I can't eject my iPod. Whats wrong?

    Everytime i go to eject my iPod i get a message that says, "The iPod "Andy's iPod" cannot be ejected because it contains files that are in use by another application" Please let me know how to fix this. Also I am deff. not going to just unplug it. I