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

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

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

    jojo's blog--快樂憂傷都與你同在
    為夢想而來,為自由而生。 性情若水,風起水興,風息水止,故時而激蕩,時又清平……
    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 技術相關

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

    常用鏈接

    留言簿(6)

    隨筆檔案

    文章分類

    文章檔案

    新聞分類

    新聞檔案

    相冊

    收藏夾

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 天天干在线免费视频| 美女视频黄a视频全免费网站色| 成年女人毛片免费观看97| 国产激情久久久久影院老熟女免费 | 亚洲国产精品无码观看久久| 午夜精品射精入后重之免费观看| 亚洲高清毛片一区二区| 亚洲综合无码一区二区| 国产AV无码专区亚洲AV漫画| 国产女高清在线看免费观看| 国产麻豆视频免费观看| 最近2019中文字幕免费直播| 亚洲AV人无码综合在线观看| 久久国产成人亚洲精品影院 | 在线看片免费人成视频播| 国产精品亚洲天堂| 黑人粗长大战亚洲女2021国产精品成人免费视频| 亚洲av无码无在线观看红杏| 国产aⅴ无码专区亚洲av| 亚洲最大av无码网址| 国产aⅴ无码专区亚洲av麻豆 | 国产99久久久国产精免费| 欧洲精品码一区二区三区免费看| 亚洲AV网一区二区三区 | 久久青草亚洲AV无码麻豆| 亚洲AV无码精品色午夜果冻不卡| 亚洲国产另类久久久精品| 色拍自拍亚洲综合图区| 亚洲人成片在线观看| 亚洲av午夜电影在线观看| 国产亚洲美女精品久久| 成人久久免费网站| 免费AA片少妇人AA片直播| 免费一级毛片在级播放| 99久久国产免费中文无字幕| 成人片黄网站A毛片免费| 亚洲国产精品成人网址天堂 | 台湾一级毛片永久免费| 亚洲日韩国产一区二区三区| 亚洲精品偷拍无码不卡av| 亚洲成av人无码亚洲成av人|