Editing geographic data using the ArcGIS JavaScript API requires some setup on ArcGIS Server. An editable feature service must be published on ArcGIS Server, which requires an ArcSDE geodatabase. File geodatabases, personal geodatabases, and shapefiles cannot be used to store editable data. ArcGIS Online allows you to upload editable data to ESRI's cloud service, but the data upload and editing process has requirements which are covered in Chapter 11, The Future of ArcGIS Development.
There are a few requirements for setting up an editable map application using ArcGIS Server and its JavaScript API. The geodatabase storing the data should be versioned, if you want to review the data before committing it to your default database. Versioned data also supports undo and redo operations. You may want to publish a read-only map service along with your editable feature service. Finally, some editing operations require a geometry service to handle geometry changes, as you...