1. #1
    Ext User Mohammed's Avatar
    Join Date
    Mar 2007
    Location
    Brisbane, Qld, Australia
    Posts
    34
    Vote Rating
    0
    Mohammed is on a distinguished road

      0  

    Default How to Write changes from HTML/JS files into DB ?

    How to Write changes from HTML/JS files into DB ?


    guys,

    This is a basic query, if anyone can give me a quick hint how to write content from JS web apps to backend database...

    most of the ext tools provide different ways as to how we can present data, reading content from backend in JSON/XML format. I was given excellent suggestions in my below thread on security issues and on reading from web service:

    http://extjs.com/forum/showthread.php?t=3932

    how about writing to backend database from client side using js ? i mean, if i want to write say a news article into database. User adds a bunch of details say author, date, pic, article text, short description, long decription bla bla bla...How do i pass all of these from js into backend.

    1. I cant pass all of these in Headers as this is too long. i played around with GMail and tested what happens when we Compose a new mail. It is just handled on backend.

    2. Do you think creating sessions is a good idea...? can it hold long articles text...?

    3. Do i have to create XML/JSON file when user wants to create new article (wants to add content to database). Once user finishes his writing (think of a wizard sytle apps. where user is taken through 5-10 steps to provide detailed info) and then send this xml/json file to backend logic ?

    4. In .Net web pages we write code directly in the page itself. So when the user submits, the submit_click event is fired and it undergoes N-tier arch code to perform the task. How to accomplish this using js...

    Thank you in advance...

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    Mohammed,

    The reason that you never got a response to this question the first time you posted it is because it is waaaaay too broad. You are asking questions that are far too general and open-ended for anyone to be able to give you an appropriate answer in a forum post.

    1. This doesn't even mean anything. Passing your data in "headers?" You mean HTTP headers?

    2. Creating session is not a good idea or bad -- it all depends on what you're doing. But it certainly is not a data storage solution, which sounds like your question?

    3. XML/JSON is just the data transfer format. You don't create a file, you just POST your data to the server -- the data formatting is generally handled by Ext and whatever server solution you're using.

    4. "the submit_click event is fired and it undergoes N-tier arch code to perform the task." There are many, many ways to process a user-initiated event on both the server and the client. There are also many examples in Ext of doing this the JS way (look at the FeedViewer example application). You probably need to study up a little more on the general concepts and then ask questions about pieces that you're having trouble with.

    If you want to get some help, you'll need to break up what you're asking into smaller more focused questions. And it would help if you've actually tried something and are having a specific issue, rather than simply asking others to teach you general concepts. For that, you really need to study up in some JavaScript books and work through some examples on your own before trying to tackle a system architecture all at once.

  3. #3
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    ... like trying to get somoene to do the entire job.


    I break things down into little do-able parts.

  4. #4
    Ext User Mohammed's Avatar
    Join Date
    Mar 2007
    Location
    Brisbane, Qld, Australia
    Posts
    34
    Vote Rating
    0
    Mohammed is on a distinguished road

      0  

    Default my question was really simple...will come up with solution

    my question was really simple...will come up with solution


    Sorry Brian,

    My question might be too broad....but its really really simple.

    1. How to write content from client side into DB using Ext tools using js? Its as simple as it is...

    I know its non Ext query. becz. coming from Non-JS background and the only way to use these beautiful Ext tools is through js only something am learning from scratch.

    Since am still evaluating these tools. I want to know, how to handle the stuff in such and such case in js.

    yes, am surfing the net and learning JS on a daily basis. Will come up with solutions, when found...

    Thank you

  5. #5
    Ext JS Premium Member cdomigan's Avatar
    Join Date
    Mar 2007
    Posts
    148
    Vote Rating
    1
    cdomigan is on a distinguished road

      0  

    Default


    Quote Originally Posted by Mohammed View Post
    1. How to write content from client side into DB using Ext tools using js? Its as simple as it is...
    This is the job of your server-side script, not Ext. You need to POST your data (via ajax or via a normal form submission) to your server which then assumes responsibility for writing values to your DB.

  6. #6
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by Mohammed View Post
    My question might be too broad....but its really really simple.

    1. How to write content from client side into DB using Ext tools using js? Its as simple as it is...
    Well, unfotunately, it is not a simple question to answer as it can be done in many ways. Sounds like you are a .NET dev, so the most basic approach is to simply post (async or normal) to a .aspx page, and in the code-behind of that page, you would evaluate the HTTP form object if it's a POST (request object if it's a GET) to get your data, save it via your data access solution of choice, then format some kind of response that your client page is expecting (most people use JSON format for this). The drawback to this approach is that it's completely manual.

    Once you understand generally how the process works, you might want to look at Michael Schwarz's fantastic AjaxPro library, which can provide the server side interface that Ext would use (http://www.ajaxpro.info/) and handles all the JSON processing automatically. There are other similar libraries available if you Google ".NET Ajax" but AjaxPro works well and has been around for a while.

    You should start there and see if you can get a simple example working. If you have issues getting it working, feel free to post your code. Using .NET and AjaxPro has also been discussed before on this forum if you search.

  7. #7
    Ext User Mohammed's Avatar
    Join Date
    Mar 2007
    Location
    Brisbane, Qld, Australia
    Posts
    34
    Vote Rating
    0
    Mohammed is on a distinguished road

      0  

    Default sample for vb.net and javascript async code

    sample for vb.net and javascript async code


    Thank you brian...

    yep,

    came up with sample solution for Asynchronously communicating server side classes & methods written in vb.net code from javascript....using AJAX.Net professional

    i have posted complete code and output in my blog here http://devaspects.com/blog/index.php?blog=6

    hope it helps...

    Mohammed
    www.abdulsalam.info

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar