jacmoe nice reply, I agree 100 percent. I have used laravel since ver 4.2, prior to that I used Simple mvc framework.
Simple mvc framework evolved into nova framework, I was a contributor to SMVC. Short quick story, main developer’s company also used L4.2, did not want a bunch of upgrading to do, hence he / they kinda took the best of laravel, some cake ideas, and of course some custom code and made nova. Nova now is modern and close to what say laravel 5.* is.
I currently use nova on one project and laravel 5.5 on another. So why am I here. A newbee on the laravel site was trying to decide between laravel and yii2. He had a bunch of trouble getting up and running. Finally after getting discouraged I guess he picked Yii2.
That sparked my curiosity, so I decided to try Yii2.
I have used cake, laravel, nova, and now experimenting with Yii2.
Basically these four are very similar, yes minor differences. But take this older java query as example:
public List<Pet> list() throws SQLException {
Connection connection = null;
PreparedStatement st = null;
ResultSet resultSet = null;
List<Pet> pets = new ArrayList<Pet>();
try {
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(PetDAO.class.getName()).log(Level.SEVERE, null, ex);
}
offset = 5;
rowsperpage = 5;
connection = (Connection) DriverManager.getConnection("jdbc:mysql:///petback2", "root", "secret");
st = connection.prepareStatement("select * from pets where petname like ? LIMIT "+ offset + ", " + rowsperpage);
st.setString(1, this.t1 + "%");
resultSet = st.executeQuery();
while (resultSet.next()) {
Pet pet = new Pet();
pet.setpetid(resultSet.getString("petid"));
pet.setpetname(resultSet.getString("petname"));
pets.add(pet);
}
} finally {
if (resultSet != null) try { resultSet.close(); } catch (SQLException ignore) {}
if (st != null) try { st.close(); } catch (SQLException ignore) {}
if (connection != null) try { connection.close(); } catch (SQLException ignore) {}
}
return pets;
}
}
All the above mentioned frameworks have access to normal PDO and there are the times when I just like doing a normal query.
But times when
$query = Dog::where('dogname', 'like', $dogsch);
if ($aval == "n") {
$query->where('adopted', '=', 1);
} else if ($aval == "y") {
$query->where('adopted', '=', 0);
}
$dogs = $query->orderBy('lastedit', 'DESC')->paginate(5);
I like that. So yes Yii and the others are all flexible enough to allow the programmer the freedom to code as needed.
Only thing I did not like right away is Yiis asset thing, So I wrote me a custom class to handle the way I like doing assets:
Basically like
<link href="<?php echo Resource::asset('css/dogs/style.css'); ?>" rel="stylesheet">
<script type="text/javascript" src="<?php echo Resource::asset('js/jquery.js'); ?>"></script>
I like keeping things simple.