473,625 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to do basic CRUD apps with Python

With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.

With Python, finding such library, or apps. seems to be much more
difficult to find.

I thought django might be a good way, but I can not seem to get an
answer on that board.

I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.

Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?

Please, don't advertise your PHP/Ajax apps.

May 13 '07 #1
11 4342

On May 13, 2007, at 6:20 PM, walterbyrd wrote:
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.

With Python, finding such library, or apps. seems to be much more
difficult to find.

I thought django might be a good way, but I can not seem to get an
answer on that board.

I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.

Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?

Please, don't advertise your PHP/Ajax apps.
You got answers on django-users! The best IMHO was the one from
dballanc: "Django is good for providing the backend, but most of your
functionality is probably going to be provided by ajax/javascript
which django will happily communicate with, but does not provide."

Django provides an ORM, but you don't have to use it. If you want,
you can connect directly to your database just like you did with
php. I've actually done that because something just "feels wrong"
about using an ORM for CRUDy applications.

May 14 '07 #2

walterbyrd a scris:
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.

With Python, finding such library, or apps. seems to be much more
difficult to find.

I thought django might be a good way, but I can not seem to get an
answer on that board.

I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.

Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?

Please, don't advertise your PHP/Ajax apps.
Try SqlSoup from SqlAlchemy. I can send examples in PyQt4.

May 14 '07 #3

walterbyrd a scris:
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.

With Python, finding such library, or apps. seems to be much more
difficult to find.

I thought django might be a good way, but I can not seem to get an
answer on that board.

I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.

Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?

Please, don't advertise your PHP/Ajax apps.
SqlAlchemy-SqlSoup Example:
# SqlSoup. CRUD with one table
from sqlalchemy.ext. sqlsoup import SqlSoup
# connection: 'postgres://user:password@a ddress:port/db_name'
db = SqlSoup('postgr es://postgres:postgr es@localhost:54 32/testdb')

# read data
person = db.person.selec t()
print person

# index is not the same with primary key !!!
print person[0].firstname

# write in column firstname
person[0].firstname = "George"

# effective write
db.flush()

print person[0]

print db.person.count ()

for i in range(0, db.person.count ()):
print person[i]

db.person.inser t(id=1000, firstname='Mitu ')
db.flush

# after insert, reload mapping:
person = db.person.selec t()

# delete:
# record select
mk = db.person.selec tone_by(id=1000 )
# delete
db.delete(mk)
db.flush()

person = db.person.selec t()

print person
"""
FROM DOCUMENTATION:

=======
SqlSoup
=======

Introduction

SqlSoup provides a convenient way to access database tables without
having to
declare table or mapper classes ahead of time.

Suppose we have a database with users, books, and loans tables
(corresponding to
the PyWebOff dataset, if you're curious).
For testing purposes, we'll create this db as follows:
>>from sqlalchemy import create_engine
e = create_engine(' sqlite:///:memory:')
for sql in _testsql: e.execute(sql) #doctest: +ELLIPSIS
<...

Creating a SqlSoup gateway is just like creating an SqlAlchemy engine:
>>from sqlalchemy.ext. sqlsoup import SqlSoup
db = SqlSoup('sqlite :///:memory:')
or, you can re-use an existing metadata:
>>db = SqlSoup(BoundMe taData(e))
You can optionally specify a schema within the database for your
SqlSoup:

# >>db.schema = myschemaname

Loading objects

Loading objects is as easy as this:
>>users = db.users.select ()
users.sort( )
users
[MappedUsers(nam e='Joe Student',em**** ********@exampl e.edu',
password='stude nt',classname=N one,admin=0),
MappedUsers(nam e='Bhargan Basepair',em*** **********@exam ple.edu',
password='basep air',classname= None,admin=1)]

Of course, letting the database do the sort is better
(".c" is short for ".columns") :
>>db.users.sele ct(order_by=[db.users.c.name])
[MappedUsers(nam e='Bhargan Basepair',em*** **********@exam ple.edu',
password='basep air',classname= None,admin=1),
MappedUsers(nam e='Joe Student',em**** ********@exampl e.edu',
password='stude nt',classname=N one,admin=0)]

Field access is intuitive:
>>users[0].email
u'*******@examp le.edu'

Of course, you don't want to load all users very often.
Let's add a WHERE clause.
Let's also switch the order_by to DESC while we're at it.
>>from sqlalchemy import or_, and_, desc
where = or_(db.users.c. name=='Bhargan Basepair',
db************* ***********@exa mple.edu')
>>db.users.sele ct(where, order_by=[desc(db.users.c .name)])
[MappedUsers(nam e='Joe Student',em**** ********@exampl e.edu',
password='stude nt',classname=N one,admin=0),
MappedUsers(nam e='Bhargan Basepair',em*** **********@exam ple.edu',
password='basep air',classname= None,admin=1)]

You can also use the select...by methods if you're querying on a
single column.
This allows using keyword arguments as column names:
>>db.users.sele ctone_by(name=' Bhargan Basepair')
MappedUsers(nam e='Bhargan Basepair',em*** **********@exam ple.edu',
password='basep air',classname= None,admin=1)

Select variants

All the SqlAlchemy Query select variants are available.
Here's a quick summary of these methods:

* get(PK): load a single object identified by its primary key
(either a scalar, or a tuple)
* select(Clause, **kwargs): perform a select restricted by the
Clause
argument; returns a list of objects.
The most common clause argument takes the form
"db.tablename.c .columname == value."
The most common optional argument is order_by.
* select_by(**par ams): select methods ending with _by allow using
bare
column names. (columname=valu e) This feels more natural to
most Python
programmers; the downside is you can't specify order_by or
other
select options.
* selectfirst, selectfirst_by: returns only the first object
found;
equivalent to select(...)[0] or select_by(...)[0], except None
is returned
if no rows are selected.
* selectone, selectone_by: like selectfirst or selectfirst_by, but
raises
if less or more than one object is selected.
* count, count_by: returns an integer count of the rows selected.

See the SqlAlchemy documentation for details:

* http://www.sqlalchemy.org/docs/datam...amapping_query
for general info and examples,
* http://www.sqlalchemy.org/docs/sqlconstruction.myt
for details on constructing WHERE clauses.

Modifying objects

Modifying objects is intuitive:
>>user = _
user.email = 'b************* *@example.edu'
db.flush()
(SqlSoup leverages the sophisticated SqlAlchemy unit-of-work code, so
multiple
updates to a single object will be turned into a single UPDATE
statement
when you flush.)

To finish covering the basics, let's insert a new loan, then delete
it:
>>book_id = db.books.select first(db.books. c.title=='Regio nal Variation in Moss').id
db.loans.inse rt(book_id=book _id, user_name=user. name)
MappedLoans(boo k_id=2,user_nam e='Bhargan Basepair',loan_ date=None)
>>db.flush()
>>loan = db.loans.select one_by(book_id= 2, user_name='Bhar gan
Basepair')
>>db.delete(loa n)
db.flush()
You can also delete rows that have not been loaded as objects.
Let's do our insert/delete cycle once more, this time using the loans
table's
delete method. (For SQLAlchemy experts: note that no flush() call is
required
since this delete acts at the SQL level, not at the Mapper level.)
The same where-clause construction rules apply here as to the select
methods.
>>db.loans.inse rt(book_id=book _id, user_name=user. name)
MappedLoans(boo k_id=2,user_nam e='Bhargan Basepair',loan_ date=None)
>>db.flush()
db.loans.dele te(db.loans.c.b ook_id==2)
You can similarly update multiple rows at once.
This will change the book_id to 1 in all loans whose book_id is 2:
>>db.loans.upda te(db.loans.c.b ook_id==2, book_id=1)
db.loans.sele ct_by(db.loans. c.book_id==1)
[MappedLoans(boo k_id=1,user_nam e='Joe
Student',loan_d ate=datetime.da tetime(2006,
7,
12, 0, 0))]

Joins

Occasionally, you will want to pull out a lot of data from related
tables all
at once. In this situation, it is far more efficient to have the
database
perform the necessary join. (Here we do not have "a lot of data," but
hopefully
the concept is still clear.) SQLAlchemy is smart enough to recognize
that loans
has a foreign key to users, and uses that as the join condition
automatically.
>>join1 = db.join(db.user s, db.loans, isouter=True)
join1.select_ by(name='Joe Student')
[MappedJoin(name ='Joe Student',em**** ********@exampl e.edu',
password='stude nt',classname=N one,admin=0,boo k_id=1,
user_name='Joe Student',loan_d ate=datetime.da tetime(2006, 7,
12, 0, 0))]

If you're unfortunate enough to be using MySQL with the default MyISAM
storage
engine, you'll have to specify the join condition manually, since
MyISAM does
not store foreign keys.
Here's the same join again, with the join condition explicitly
specified:
>>db.join(db.us ers, db.loans, db.users.c.name ==db.loans.c.us er_name, isouter=True)
<class 'sqlalchemy.ext .sqlsoup.Mapped Join'>

You can compose arbitrarily complex joins by combining Join objects
with tables
or other joins. Here we combine our first join with the books table:
>>join2 = db.join(join1, db.books)
join2.select( )
[MappedJoin(name ='Joe Student',em**** ********@exampl e.edu',
password='stude nt',classname=N one,admin=0,boo k_id=1,
user_name='Joe Student',loan_d ate=datetime.da tetime(2006, 7, 12,
0, 0),
id=1,title='Mus tards I Have
Known',publishe d_year='1989',a uthors='Jones')]

If you join tables that have an identical column name, wrap your join
with
"with_label s", to disambiguate columns with their table name:
>>db.with_label s(join1).select ()
[MappedUsersLoan sJoin(users_nam e='Joe Student',
users_em******* *****@example.e du',users_passw ord='student',
users_classname =None,users_adm in=0,loans_book _id=1,
loans_user_name ='Joe Student',
loans_loan_date =datetime.datet ime(2006, 7, 12, 0, 0))]

Advanced Use
Mapping arbitrary Selectables

SqlSoup can map any SQLAlchemy Selectable with the map method.
Let's map a Select object that uses an aggregate function; we'll use
the
SQLAlchemy Table that SqlSoup introspected as the basis.
(Since we're not mapping to a simple table or join, we need to tell
SQLAlchemy
how to find the "primary key," which just needs to be unique within
the select,
and not necessarily correspond to a "real" PK in the database.)
>>from sqlalchemy import select, func
b = db.books._table
s = select([b.c.published_y ear, func.count('*') .label('n')],
from_obj=[b], group_by=[b.c.published_y ear])
>>s = s.alias('years_ with_count')
years_with_co unt = db.map(s, primary_key=[s.c.published_y ear])
years_with_co unt.select_by(p ublished_year=' 1989')
[MappedBooks(pub lished_year='19 89',n=1)]

Obviously if we just wanted to get a list of counts associated with
book years
once, raw SQL is going to be less work. The advantage of mapping a
Select is
reusability, both standalone and in Joins. (And if you go to full
SQLAlchemy,
you can perform mappings like this directly to your object models.)

Raw SQL

You can access the SqlSoup's engine attribute to compose SQL
directly.
The engine's execute method corresponds to the one of a DBAPI cursor,
and returns a ResultProxy that has fetch methods you would also see on
a cursor.
>>rp = db.engine.execu te('select name, email from users order by
name')
>>for name, email in rp.fetchall(): print name, email
Bhargan Basepair ba************* @example.edu
Joe Student st*****@example .edu

You can also pass this engine object to other SQLAlchemy constructs.
"""

May 14 '07 #4

walterbyrd a scris:
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.

With Python, finding such library, or apps. seems to be much more
difficult to find.

I thought django might be a good way, but I can not seem to get an
answer on that board.

I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.

Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?

Please, don't advertise your PHP/Ajax apps.
SqlAlchemy - SqlSoup - PyQt4 (fragment) example:

import sys
from PyQt4.Qt import *
from PyQt4 import uic
from avc.avcqt4 import *
from sqlalchemy.ext. sqlsoup import SqlSoup

from ui_db import Ui_DbForm

class DbForm(QWidget, AVC):
def __init__(self, parent=None):
QWidget.__init_ _(self,parent)

self.ui = Ui_DbForm()
self.ui.setupUi (self)

# current index
self.crtIndex = 0
self.crtPk = 0

# avc variables, same names as form widgets (lineEdit, combo,
etc....)
self.edtId = 0
self.edtFirstNa me = ""
self.edtLastNam e = ""
self.edtSalary = 0.0

self.connect(se lf.ui.btnQuit, SIGNAL("clicked ()"),
qApp, SLOT("quit()"))

self.connect(se lf.ui.btnFirst, SIGNAL("clicked ()"),
self.goFirst)
self.connect(se lf.ui.btnPrior, SIGNAL("clicked ()"),
self.goPrior)
self.connect(se lf.ui.btnNext, SIGNAL("clicked ()"),
self.goNext)
self.connect(se lf.ui.btnLast, SIGNAL("clicked ()"),
self.goLast)

self.connect(se lf.ui.btnSave, SIGNAL("clicked ()"),
self.doSave)
self.connect(se lf.ui.btnAdd, SIGNAL("clicked ()"), self.doAdd)
self.connect(se lf.ui.btnDel, SIGNAL("clicked ()"),
self.doDel)

# connection: 'postgres://user:password@a ddress:port/db_name'
self.db = SqlSoup('postgr es://postgres:postgr es@localhost:54 32/
testdb')

self.goFirst()

def goFirst(self):
self.crtIndex = 0
self.doRead(sel f.crtIndex)

def goPrior(self):
if self.crtIndex 0:
self.crtIndex = self.crtIndex - 1
else:
self.crtIndex = 0
self.doRead(sel f.crtIndex)

def goNext(self):
maxIndex = self.db.person. count() - 1
if self.crtIndex < maxIndex:
self.crtIndex = self.crtIndex + 1
else:
self.crtIndex = maxIndex
self.doRead(sel f.crtIndex)

def goLast(self):
maxIndex = self.db.person. count() - 1
self.crtIndex = maxIndex
self.doRead(sel f.crtIndex)

def doSave(self):
if self.crtPk == 0:
# aflu pk-ul si adaug o inregistrare goala
newPk = self.db.engine. execute("select
nextval('person _id_seq')").fet chone()[0]
self.crtPk = newPk
self.db.person. insert(id=self. crtPk, firstname='',
lastname='', salary=0.0)
self.db.flush()
person = self.db.person. selectone_by(id =self.crtPk)
person.firstnam e = self.edtFirstNa me
person.lastname = self.edtLastNam e
person.salary = self.edtSalary
self.db.flush()

def doAdd(self):
self.crtPk = 0
self.edtId = self.crtPk
self.edtFirstNa me = ""
self.edtLastNam e = ""
self.edtSalary = 0.0
# inregistrarea trebuie salvata explicit
# prin apasarea butonului "Save"

def doDel(self):
mk = self.db.person. selectone_by(id =self.crtPk)
self.db.delete( mk)
self.db.flush()
self.goNext()

def doRead(self, index):
person = self.db.person. select()
self.edtId = person[index].id
self.edtFirstNa me = person[index].firstname
self.edtLastNam e = person[index].lastname
self.edtSalary = person[index].salary
# invariant pt. toate operatiile, mai putin adaugare
inregistrare
# pk-ul nu se poate modifica prin edtId !!!
self.crtPk = person[index].id
if __name__ == "__main__":
app = QApplication(sy s.argv)
# QApplication.se tStyle(QStyleFa ctory.create("C leanlooks"))
QApplication.se tStyle(QStyleFa ctory.create("P lastique"))
form = DbForm()
form.avc_init()
form.show()
sys.exit(app.ex ec_())

May 14 '07 #5
walterbyrd a écrit :
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.

With Python, finding such library, or apps. seems to be much more
difficult to find.

I thought django might be a good way, but I can not seem to get an
answer on that board.

I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.

Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?
You may want to have a look at turbogears's widgets.
May 14 '07 #6
Bruno Desthuilliers <br************ ********@wtf.we bsiteburo.oops. comwrote:
walterbyrd a ?crit :
>With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.
>With Python, finding such library, or apps. seems to be much more
difficult to find.
>I thought django might be a good way, but I can not seem to get an
answer on that board.
>I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.
>Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?
You may want to have a look at turbogears's widgets.
Admittedly I had to look up the meaning of CRUD in this context:
(http://en.wikipedia.org/wiki/Create%...ate_and_delete
create, read, update, and delete).

I'm looking at Turbogears' Widgets in another window as I type
this ... but it will be awhile before I can comment on how they
might apply to the OP's needs. Actually I'm wholly unqualified
to comment on his or her needs ... but I can comment on how I
interpreted the question.

Even with the SQLAlchemy SQLSoup examples there's still an
annoying about of boilerplate coding that has to be done in order
to create a web application for doing CRUD on a database.

The missing element seems to be the ability to autogenerate
web forms and reports with the requisite controls in them.

Imagine, for a moment, being able to do something like:
>>import sqlalchemy.ext. webcrud as crud
db = crud.open(....)
db.displayTop Form()
'<HTML ....
....
</HTML>'

... and having a default "top level" web page generated with
options to query the database (or some specific table in the
database to be more specific, add new entries, etc).

I'm thinking of some sort of class/module that would generate
various sorts of HTML forms by default, but also allow one to
sub-class each of the form/query types to customize the contents.

It would use introspection on the database columns and constraints
to automatically generate input fields for each of the columns and
even fields for required foreign keys (or links to the CRUD for those
tables?). Ideally it would also automatically hide autogenerated
(index/key) fields, and map the table column IDs to form names (with
gettext support for l10n of those).

I think that's the sort of thing the OP was looking for. Not the
ORM ... the the glue between the web framework and the ORM.
--
Jim Dennis,
Starshine: Signed, Sealed, Delivered

May 15 '07 #7
On Sunday 13 May 2007 15:20, walterbyrd wrote:
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
and non-Ajax solutions abound.

With Python, finding such library, or apps. seems to be much more
difficult to find.

I thought django might be a good way, but I can not seem to get an
answer on that board.

I would like to put together a CRUD grid with editable/deletable/
addable fields, click on the headers to sort. Something that would
sort-of looks like an online spreadsheet. It would be nice if the
fields could be edited in-line, but it's not entirely necessary.

Are there any Python libraries to do that sort of thing? Can it be
done with django or cherrypy?

Please, don't advertise your PHP/Ajax apps.
Turbogears has catwalk, which is already an interface to a database, but
there is a CRUD template for TG:
http://docs.turbogears.org/1.0/CRUDTemplate

Might be what you're looking for.

j

--
Joshua Kugler
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ Â*ID 0xDB26D7CE

--
Posted via a free Usenet account from http://www.teranews.com

May 16 '07 #8
On Monday 14 May 2007 18:46, James T. Dennis wrote:
I'm thinking of some sort of class/module that would generate
various sorts of HTML forms by default, but also allow one to
sub-class each of the form/query types to customize the contents.
Turbogears has catwalk, which is already an interface to a database, but
there is a CRUD template for TG:
http://docs.turbogears.org/1.0/CRUDTemplate

Might be what you're looking for.

j

--
Joshua Kugler
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ Â*ID 0xDB26D7CE

--
Posted via a free Usenet account from http://www.teranews.com

May 16 '07 #9
Sorry about the duplicate post! My news reader never showed my first reply!

j

--
Posted via a free Usenet account from http://www.teranews.com

May 16 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
4364
by: John | last post by:
I have a problem, it's not with any code I have because... there is no code. When I run a blank visual basic 6 form, it opens up just fine. When I add a text box, a caption, and a button... it gives me an error from microsoft's error report and asks me to send or not send the error, i chose and then it quits. The error report won't let me copy the data, but i gather it's pretty useless information unless you have the source code to visual...
7
9276
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. # No warranty express or implied for the accuracy, fitness to purpose
4
1804
by: Francis Lavoie | last post by:
Hello I have some questions regarding webframework, I must say that I quite lost and these questions are basicly to help me understand the way it work. I have some knowledge with PHP and JSP. I have looked for a python web framework to build a web site, a site that I had start in php (and quite finish), but for some reason I wont explain, I lost everything. I have started writting app with python 6
3
3724
by: Torben Madsen | last post by:
Hello, I have a C# problem that I hope you could help me with. I'm making a program where I need data from a database using ADO.NET. The problem is that I can't figure out how to retrieve the data without using a datagrid (I presume that a dataset is the correct solution, when I also need to CRUD (Create-Read-Update-Delete).
3
1675
by: Jim H | last post by:
If there is a site someone can point me to that answers such basic questions, rather than taking up support's time posting answers, please let me know. I've developed C# .NET, unmanaged C++, and MFC applications. I have not written any C++.NET apps yet and have some very basic questions. Are managed C++ programs fully independent executables or are they still processed at run time like C# and vb.net apps are? Is the finished product...
4
1484
by: seabird | last post by:
I have a blog at http://myscrapblog.com/techfiddle/ and I'm utterly confused about what RSS is and what to do with the block of text I get when I ask for an RSS I'm looking at http://www.wisegeek.com/what-is-rss.htm "What is RSS" so okay, I get that, but what is that block of text I get: http://www.myscrapblog.com/rss.php?u=techfiddle I don't understand what this is, or what to do with it. There is an
3
3534
by: =?Utf-8?B?dGhlamFja29mYWxs?= | last post by:
Hi. Is there a way to generate the CRUD stored procedures for a table using the Visual Studio 2005? I tried to do it in a new database project, but I can't find a way to do it. Can VS 2005 generate them? Thanks. J --
13
2702
by: John Kraft | last post by:
Friends, I'm working on some crud stuff, and I was looking for opinions on the subject. Below, I have pasted some VERY simple sample code. Class2 is a "traditional" crud type object. In a real example, these objects would probably implement some kind of ICrud interface with the common methods. I'm finding that many times, though, I want to use these objects as simple data objects, and I don't need all the database functionallity.
0
1376
by: CBFalconer | last post by:
For the past week I have been collecting data on the relative incidence of crud in the 18 newsgroups I monitor. Here crud is defined as anything that gets caught by my filters, and good is anything that passes them. The results follow: date | Sat | Sun | Mon | Tue | Wed | Thu | Fri | Sat ---- --- --- --- --- --- --- --- --- Bad | 96 | 108 | 93 | 100 | 101 | 135 | 101 | 74 Good | 387 | 388 | 598 | 519 | 550 | 643 |...
0
8251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.