<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    jojo's blog--快樂憂傷都與你同在
    為夢想而來,為自由而生。 性情若水,風(fēng)起水興,風(fēng)息水止,故時而激蕩,時又清平……
    posts - 11,  comments - 30,  trackbacks - 0

    In RESTful paradigm we give a piece of data ( or in other word ‘Resource’) a unique URL. And in order to manipulate data we use HTTP verbs POST/PUT (create, update), GET (read), DELETE (delete). For an example
    take the scenario of manipulating Students data in a high school. Here is how each operation is mapped to a http request (URL + HTTP verb)

    HTTP request Operation
    POST api/students/ben Create the resource (peice of data) called ben as a student. HTTP body or the url itself (e.g. api/students/ben?age=15&country=xx) may contain the required information about ben
    GET api/students/ben Retrieve the information about ben.
    PUT api/students/ben Update ben
    DELETE api/student/ben Delete the student called ‘ben’.

    With the addition of all these HTTP verbs WSO2 WSF/PHP 2.0.0 become a great tool for RESTful developers. Specially with the introducing Data Services library it was so easy to make your database a REST service. I m thinking of preparing a series of application to demonstrate the power of WSF/PHP with all these new features.

    This demo -RESTful School- shows how you map a URL to a peice of data. Here we use only the http “GET” method (which is the most to used in practicle data service).

    Here is some description of the operations you find in there. Just check the source code for RESTful School demo to see how this is done in code level.

    Operation URL SQL Query Note
    Get All subjects
    subjects
    SELECT subjectName, subjectTeacher FROM Subjects
    With no parameters
    Get subject information From Name
    subjects/{name}
    SELECT subjectName, subjectTeacher FROM Subjects where SubjectName = ?
    The single parameter feed from prepared statement syntax
    Get All students
    students
    SELECT * FROM Students
    Again no parameters
    Get students From Name
    students/{name}
    Inner Query:
    SELECT subjectName, marks FROM Marks m, Subjects s ".
    " where m.studentId = ? and m.subjectID = s.subjectId

    Outer Query

    SELECT * FROM Students where StudentName = ?
    Nested query, Inner query is called from outer query
    Get Marks per Students per Subjects
    students/{student}/marks/{subject}
    SELECT marks FROM Marks, Subjects, Students where StudentName = ?".
    " and SubjectName = ? and Marks.subjectId = Subjects.subjectId".
    " and Marks.studentID = Students.StudentId;
    Two parameters, and ‘?’ in the sql query..
    posted on 2008-10-07 15:39 Blog of JoJo 閱讀(253) 評論(0)  編輯  收藏 所屬分類: Linux 技術(shù)相關(guān)

    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(6)

    隨筆檔案

    文章分類

    文章檔案

    新聞分類

    新聞檔案

    相冊

    收藏夾

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 日韩人妻无码精品久久免费一 | 亚洲精品乱码久久久久久蜜桃不卡| 亚洲六月丁香婷婷综合| 91av免费观看| 亚洲人成网www| 99久久久国产精品免费牛牛| 亚洲AV区无码字幕中文色| 性色午夜视频免费男人的天堂 | 色视频色露露永久免费观看| 亚洲欧美日韩一区二区三区| 国产精品深夜福利免费观看| 爱情岛亚洲论坛在线观看| 亚洲av无码不卡私人影院| 夜夜爽妓女8888视频免费观看| 亚洲综合色成在线播放| 色播在线永久免费视频网站| 亚洲AV日韩AV天堂久久| 最近中文字幕高清免费中文字幕mv| 亚洲国产精品成人精品小说| 成年女人男人免费视频播放 | 野花香在线视频免费观看大全 | 曰批全过程免费视频播放网站 | 91亚洲精品第一综合不卡播放| 亚洲免费观看在线视频| 亚洲国产成人精品无码区二本| 免费精品国产自产拍观看| 中国毛片免费观看| 亚洲欧洲国产视频| 日本成人免费在线| 两个人看的www高清免费视频| 美女黄色毛片免费看| 亚洲精品国产日韩无码AV永久免费网 | 亚洲一级毛片免费看| 国产免费观看网站| 久久久久久久99精品免费观看| 亚洲人妖女同在线播放| 免费一级毛片正在播放| 69精品免费视频| 男女超爽视频免费播放| 亚洲综合婷婷久久| 免费大黄网站在线观看|